projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9616aff
)
udhcp: use fdprintf for pidfile creation (smaller code)
author
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 14 Mar 2007 21:54:42 +0000
(21:54 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 14 Mar 2007 21:54:42 +0000
(21:54 -0000)
networking/udhcp/pidfile.c
patch
|
blob
|
history
diff --git
a/networking/udhcp/pidfile.c
b/networking/udhcp/pidfile.c
index bcb2608c57e5ba98894ae633fd01b77e8a3f2d9a..be65d5fc90916e6d4a41cb74b51d8e5de1fb8cf4 100644
(file)
--- a/
networking/udhcp/pidfile.c
+++ b/
networking/udhcp/pidfile.c
@@
-52,15
+52,9
@@
int pidfile_acquire(const char *pidfile)
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);
}