Change daemon.GenericMain/utils.Daemonize workflow
This patch copies the pipe-based error reporting functionality from utils.StartDaemon (I gave up for now on tryin to merge the two). This patch will fix two longstanding bugs: - if we fork, we lose all error reporting from the child to the original parent - if we fork, the original parent exits before the child is ready to "work" (whatever the work might be) Both these are fixed once the users of daemon.GenericMain are converted to the three-state setup, as we'll get error reporting via the pipe and also not exit until the PrepFn is done. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
Loading
Please register or sign in to comment