[BusyBox-cvs] busybox/networking/udhcp common.c,1.4,1.5
Russ Dill
russ at busybox.net
Fri Dec 26 23:41:31 UTC 2003
- Previous message: [BusyBox-cvs] busybox/testsuite/tar tar-handles-cz-options, 1.2, 1.3 tar-handles-empty-include-and-non-empty-exclude-list, 1.3, 1.4 tar-handles-exclude-and-extract-lists, 1.3, 1.4 tar-handles-multiple-X-options, 1.1, 1.2 tar-handles-nested-exclude, 1.3, 1.4
- Next message: [BusyBox-cvs] busybox/networking wget.c,1.63,1.64
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/busybox/networking/udhcp
In directory nail:/tmp/cvs-serv583
Modified Files:
common.c
Log Message:
it should work even if you don't assign a pidfile
Index: common.c
===================================================================
RCS file: /var/cvs/busybox/networking/udhcp/common.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- common.c 18 Dec 2003 22:25:38 -0000 1.4
+++ common.c 26 Dec 2003 23:41:28 -0000 1.5
@@ -59,15 +59,14 @@
#else /* __uClinux__ */
int pid_fd;
- if (!pidfile) return;
-
- pid_fd = pidfile_acquire(pidfile); /* hold lock during fork. */
+ /* hold lock during fork. */
+ if (pidfile) pid_fd = pidfile_acquire(pidfile);
if (daemon(0, 0) == -1) {
perror("fork");
exit(1);
}
daemonized++;
- pidfile_write_release(pid_fd);
+ if (pidfile) pidfile_write_release(pid_fd);
#endif /* __uClinux__ */
}
@@ -97,8 +96,10 @@
sanitize_fds();
/* do some other misc startup stuff while we are here to save bytes */
- pid_fd = pidfile_acquire(pidfile);
- pidfile_write_release(pid_fd);
+ if (pidfile) {
+ pid_fd = pidfile_acquire(pidfile);
+ pidfile_write_release(pid_fd);
+ }
/* equivelent of doing a fflush after every \n */
setlinebuf(stdout);
- Previous message: [BusyBox-cvs] busybox/testsuite/tar tar-handles-cz-options, 1.2, 1.3 tar-handles-empty-include-and-non-empty-exclude-list, 1.3, 1.4 tar-handles-exclude-and-extract-lists, 1.3, 1.4 tar-handles-multiple-X-options, 1.1, 1.2 tar-handles-nested-exclude, 1.3, 1.4
- Next message: [BusyBox-cvs] busybox/networking wget.c,1.63,1.64
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the busybox-cvs
mailing list