aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/fakeidentd.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/networking/fakeidentd.c b/networking/fakeidentd.c
index d41177b07..3d714fd7e 100644
--- a/networking/fakeidentd.c
+++ b/networking/fakeidentd.c
@@ -136,19 +136,10 @@ static void inetbind(void)
136 movefd(s, 0); 136 movefd(s, 0);
137} 137}
138 138
139static void delpidfile(void) 139static void handlexitsigs(int signum)
140{ 140{
141 /*
142 * Usually nobody has no write/delete access to directory /var/run/
143 * therefore if file cannot be deleted, it is truncated
144 */
145 if (unlink(PIDFILE) < 0) 141 if (unlink(PIDFILE) < 0)
146 close(open(PIDFILE, O_WRONLY|O_CREAT|O_TRUNC, 0644)); 142 close(open(PIDFILE, O_WRONLY|O_CREAT|O_TRUNC, 0644));
147}
148
149static void handlexitsigs(int signum)
150{
151 delpidfile();
152 exit(0); 143 exit(0);
153} 144}
154 145