Properly log errors when setting up daemon FDs
While writing the pipe-based reporting and trying various ways to break the startup, I fought for a while trying to understand why error reporting was _different_ when running the daemon as a user (with no rights). It turns out that setupDaemonFDs wants to open the log file in append mode way before, so we are not protected by the 'prepare' phase. This patch explicitly runs the 'setupDaemonFDs' function under the same handler as the prepare phase, with the only change that here we instruct handlePrepErr to not log the message via log*, since logging is not yet set up. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
Loading
Please register or sign in to comment