summaryrefslogtreecommitdiff
path: root/networking/inetd.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-03-27 22:01:31 +0000
committerDenis Vlasenko2007-03-27 22:01:31 +0000
commit10457b90db925369739a900445b640364eda5e4c (patch)
tree6d6f18564291257738360d97712724868175167e /networking/inetd.c
parentf4d40c87d3a18fccb8c0946fc09f1d8f24a2bcf3 (diff)
downloadbusybox-10457b90db925369739a900445b640364eda5e4c.zip
busybox-10457b90db925369739a900445b640364eda5e4c.tar.gz
make pidfile writing configurable.
[ui]toa_to_buf: change API. No users yet.
Diffstat (limited to 'networking/inetd.c')
-rw-r--r--networking/inetd.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/networking/inetd.c b/networking/inetd.c
index 4faa420..fd72aa7 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -1212,7 +1212,7 @@ static void goaway(int sig ATTRIBUTE_UNUSED)
}
(void) close(sep->se_fd);
}
- (void) unlink(_PATH_INETDPID);
+ remove_pidfile(_PATH_INETDPID);
exit(0);
}
@@ -1301,13 +1301,7 @@ int inetd_main(int argc, char *argv[])
setgroups(1, &gid);
}
- {
- FILE *fp = fopen(_PATH_INETDPID, "w");
- if (fp != NULL) {
- fprintf(fp, "%u\n", getpid());
- fclose(fp);
- }
- }
+ write_pidfile(_PATH_INETDPID);
if (getrlimit(RLIMIT_NOFILE, &rlim_ofile) < 0) {
bb_perror_msg("getrlimit");