From 6e6d331d97aa230625c9b50c73f5df9251b8df4b Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 3 May 2007 23:39:35 +0000 Subject: udhcpc: stop deleting our own pidfile if we daemonize. udhcp[cd]: stop using atexit magic fir pidfile removal. --- networking/udhcp/common.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'networking/udhcp/common.c') 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) return info.uptime; } -#if ENABLE_FEATURE_PIDFILE -static const char *saved_pidfile; - -static void pidfile_delete(void) -{ - if (saved_pidfile) - remove_pidfile(saved_pidfile); -} -#endif - static void create_pidfile(const char *pidfile) { if (!pidfile) @@ -43,12 +33,6 @@ static void create_pidfile(const char *pidfile) bb_perror_msg("cannot create pidfile %s", pidfile); return; } -#if ENABLE_FEATURE_PIDFILE - /* lockf(pid_fd, F_LOCK, 0); */ - if (!saved_pidfile) - atexit(pidfile_delete); - saved_pidfile = pidfile; -#endif } void udhcp_make_pidfile(const char *pidfile) -- cgit v1.2.3