Revision b78aa8c2
ID | b78aa8c273228bac04b92c6609cd733a79aef188 |
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>
Files
- added
- modified
- copied
- renamed
- deleted