libbb: use _exit, not exit, in bb_daemonize_or_rexec()
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 4 Aug 2017 21:04:17 +0000 (23:04 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 4 Aug 2017 21:04:17 +0000 (23:04 +0200)
commitb182e9ad6011909fdb76358431d23d195febaf54
tree650b66e06387f8b0f7fe054a53150809aede7701
parent692eeb81a4c54d7d8bf0d2e370c12762b2a16ff7
libbb: use _exit, not exit, in bb_daemonize_or_rexec()

By the time we reach exit in parent, child already exited or execed.
We should not re-run libc cleanup code.

While at it, introduce bb_daemon_helper() and add a few comments.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
console-tools/openvt.c
debianutils/start_stop_daemon.c
include/libbb.h
libbb/vfork_daemon_rexec.c
loginutils/login.c
printutils/lpd.c