svn commit: trunk/busybox/networking/udhcp
vda at busybox.net
vda at busybox.net
Wed Mar 14 21:54:43 UTC 2007
Author: vda
Date: 2007-03-14 14:54:42 -0700 (Wed, 14 Mar 2007)
New Revision: 18106
Log:
udhcp: use fdprintf for pidfile creation (smaller code)
Modified:
trunk/busybox/networking/udhcp/pidfile.c
Changeset:
Modified: trunk/busybox/networking/udhcp/pidfile.c
===================================================================
--- trunk/busybox/networking/udhcp/pidfile.c 2007-03-14 16:38:38 UTC (rev 18105)
+++ trunk/busybox/networking/udhcp/pidfile.c 2007-03-14 21:54:42 UTC (rev 18106)
@@ -52,15 +52,9 @@
void pidfile_write_release(int pid_fd)
{
- FILE *out;
-
if (pid_fd < 0) return;
- out = fdopen(pid_fd, "w");
- if (out) {
- fprintf(out, "%d\n", getpid());
- fclose(out);
- }
+ fdprintf(pid_fd, "%d\n", getpid());
lockf(pid_fd, F_UNLCK, 0);
close(pid_fd);
}
More information about the busybox-cvs
mailing list