diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-28 02:01:31 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-28 02:01:31 +0400 |
commit | 10457b90db925369739a900445b640364eda5e4c (patch) | |
tree | 6d6f18564291257738360d97712724868175167e /networking/inetd.c | |
parent | f4d40c87d3a18fccb8c0946fc09f1d8f24a2bcf3 (diff) |
make pidfile writing configurable.
[ui]toa_to_buf: change API. No users yet.
Diffstat (limited to 'networking/inetd.c')
-rw-r--r-- | networking/inetd.c | 10 |
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) } (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"); |