diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-03 23:39:35 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-03 23:39:35 +0000 |
commit | 6e6d331d97aa230625c9b50c73f5df9251b8df4b (patch) | |
tree | f5ad77208e9a8da163cb347b5e3ceea648a8b7e7 /networking/udhcp/common.c | |
parent | f71d916b60079f2009a714e49cb3e83efedbfb77 (diff) | |
download | busybox-w32-6e6d331d97aa230625c9b50c73f5df9251b8df4b.tar.gz busybox-w32-6e6d331d97aa230625c9b50c73f5df9251b8df4b.tar.bz2 busybox-w32-6e6d331d97aa230625c9b50c73f5df9251b8df4b.zip |
udhcpc: stop deleting our own pidfile if we daemonize.
udhcp[cd]: stop using atexit magic fir pidfile removal.
Diffstat (limited to 'networking/udhcp/common.c')
-rw-r--r-- | networking/udhcp/common.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index 721888f6d..76f8bf703 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c | |||
@@ -24,16 +24,6 @@ long uptime(void) | |||
24 | return info.uptime; | 24 | return info.uptime; |
25 | } | 25 | } |
26 | 26 | ||
27 | #if ENABLE_FEATURE_PIDFILE | ||
28 | static const char *saved_pidfile; | ||
29 | |||
30 | static void pidfile_delete(void) | ||
31 | { | ||
32 | if (saved_pidfile) | ||
33 | remove_pidfile(saved_pidfile); | ||
34 | } | ||
35 | #endif | ||
36 | |||
37 | static void create_pidfile(const char *pidfile) | 27 | static void create_pidfile(const char *pidfile) |
38 | { | 28 | { |
39 | if (!pidfile) | 29 | if (!pidfile) |
@@ -43,12 +33,6 @@ static void create_pidfile(const char *pidfile) | |||
43 | bb_perror_msg("cannot create pidfile %s", pidfile); | 33 | bb_perror_msg("cannot create pidfile %s", pidfile); |
44 | return; | 34 | return; |
45 | } | 35 | } |
46 | #if ENABLE_FEATURE_PIDFILE | ||
47 | /* lockf(pid_fd, F_LOCK, 0); */ | ||
48 | if (!saved_pidfile) | ||
49 | atexit(pidfile_delete); | ||
50 | saved_pidfile = pidfile; | ||
51 | #endif | ||
52 | } | 36 | } |
53 | 37 | ||
54 | void udhcp_make_pidfile(const char *pidfile) | 38 | void udhcp_make_pidfile(const char *pidfile) |