diff options
author | Julien Cristau <jcristau@debian.org> | 2008-08-20 01:30:59 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-07-17 22:35:29 -0700 |
commit | 72240433a85410e68a3b6705e097337ff985ae90 (patch) | |
tree | daf48acbcb8f9da9dc5ae3abf4b4d416b30ff218 | |
parent | 6dfbdf2823dc50c6b0ff24afbc58c67dc1651bef (diff) |
Call InitErrorLog() right after BecomeDaemon()
The latter points stderr to /dev/null, so the sooner we open the log
after that, the better.
-rw-r--r-- | dm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -142,6 +142,8 @@ main (int argc, char **argv) } if (debugLevel == 0 && daemonMode) BecomeDaemon (); + if (debugLevel == 0) + InitErrorLog (); if (debugLevel >= 10) nofork_session = 1; /* SUPPRESS 560 */ @@ -154,8 +156,6 @@ main (int argc, char **argv) pidFile, oldpid); exit (1); } - if (debugLevel == 0) - InitErrorLog (); if (nofork_session == 0) { /* Clean up any old Authorization files */ |