summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-07-20 13:09:05 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-07-27 09:31:02 +1000
commitf51e42f583073bde0bc8131887cb7220636c8855 (patch)
tree2eeb2e4340f6a8b01a0fc9c3a4310d626d54a18f /os
parent01de08c7d2c00eef238adba6665896ea3cd7d511 (diff)
Terminate the log with one last message.
Instead of just closing the log when everything is done, put one more message in stating that we're actually terminating. Users or scripts that look at the Xorg.log will then know that a) the server has terminated properly and b) why the server terminated (to some degree, given that most real-world errors will be caused by AbortServer()). Acked-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'os')
-rw-r--r--os/log.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/os/log.c b/os/log.c
index 4a310e64d..f51976284 100644
--- a/os/log.c
+++ b/os/log.c
@@ -231,9 +231,11 @@ LogInit(const char *fname, const char *backup)
}
void
-LogClose(void)
+LogClose(enum ExitCode error)
{
if (logFile) {
+ ErrorF("Server terminated %s (%d). Closing log file.\n",
+ (error == EXIT_NO_ERROR) ? "successfully" : "with error", error);
fclose(logFile);
logFile = NULL;
}
@@ -411,7 +413,7 @@ AbortServer(void)
CloseWellKnownConnections();
OsCleanup(TRUE);
CloseDownDevices();
- AbortDDX();
+ AbortDDX(EXIT_ERR_ABORT);
fflush(stderr);
if (CoreDump)
OsAbort();