By popular request reinstate fakeidentd's standalone mode.

Since this is also needed for other applets like telnetd,
introduce generic driver for such things.
It even supports inetd-wait ('linger') mode, when inetd
hands out listen socket to child and waits to it to die,
instead of handing out accepted socket and continuing
listening itself (nowait mode).
Code growth ~200 bytes.
NB: our inetd doesn't support wait mode yet (or mabe it is buggy).
This commit is contained in:
Denis Vlasenko
2007-01-14 01:29:06 +00:00
parent 150f402b36
commit 7a431b3715
7 changed files with 524 additions and 25 deletions

View File

@@ -278,6 +278,8 @@ extern int wait4pid(int pid);
extern void xsetgid(gid_t gid);
extern void xsetuid(uid_t uid);
extern void xdaemon(int nochdir, int noclose);
/* More clever/thorough xdaemon */
extern void bb_sanitize_stdio(int daemonize);
extern void xchdir(const char *path);
extern void xsetenv(const char *key, const char *value);
extern int xopen(const char *pathname, int flags);