summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2008-08-20 01:30:59 +0200
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-07-17 22:35:29 -0700
commit72240433a85410e68a3b6705e097337ff985ae90 (patch)
treedaf48acbcb8f9da9dc5ae3abf4b4d416b30ff218
parent6dfbdf2823dc50c6b0ff24afbc58c67dc1651bef (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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dm.c b/dm.c
index 0edb565..1915c85 100644
--- a/dm.c
+++ b/dm.c
@@ -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 */