aboutsummaryrefslogtreecommitdiff
path: root/networking/inetd.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-27 22:01:31 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-27 22:01:31 +0000
commit10457b90db925369739a900445b640364eda5e4c (patch)
tree6d6f18564291257738360d97712724868175167e /networking/inetd.c
parentf4d40c87d3a18fccb8c0946fc09f1d8f24a2bcf3 (diff)
downloadbusybox-w32-10457b90db925369739a900445b640364eda5e4c.tar.gz
busybox-w32-10457b90db925369739a900445b640364eda5e4c.tar.bz2
busybox-w32-10457b90db925369739a900445b640364eda5e4c.zip
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 4faa4203a..fd72aa726 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -1212,7 +1212,7 @@ static void goaway(int sig ATTRIBUTE_UNUSED)
1212 } 1212 }
1213 (void) close(sep->se_fd); 1213 (void) close(sep->se_fd);
1214 } 1214 }
1215 (void) unlink(_PATH_INETDPID); 1215 remove_pidfile(_PATH_INETDPID);
1216 exit(0); 1216 exit(0);
1217} 1217}
1218 1218
@@ -1301,13 +1301,7 @@ int inetd_main(int argc, char *argv[])
1301 setgroups(1, &gid); 1301 setgroups(1, &gid);
1302 } 1302 }
1303 1303
1304 { 1304 write_pidfile(_PATH_INETDPID);
1305 FILE *fp = fopen(_PATH_INETDPID, "w");
1306 if (fp != NULL) {
1307 fprintf(fp, "%u\n", getpid());
1308 fclose(fp);
1309 }
1310 }
1311 1305
1312 if (getrlimit(RLIMIT_NOFILE, &rlim_ofile) < 0) { 1306 if (getrlimit(RLIMIT_NOFILE, &rlim_ofile) < 0) {
1313 bb_perror_msg("getrlimit"); 1307 bb_perror_msg("getrlimit");