os: "Server terminated successfully" is not an error

ErrorFSigSafe calls LogVMessageVerbSigSafe with the message type set to X_ERROR.
That generates this in the log:

  (EE) Server terminated successfully (0). Closing log file.

People periodically report this as an error, sometimes quoting this "error"
rather than an earlier error that actually caused a problem.

v2: Use X_INFO instead of X_NOTICE

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Aaron Plattner 2014-11-21 08:39:02 -08:00 committed by Keith Packard
parent b09d593428
commit c299400168

View File

@ -257,8 +257,11 @@ void
LogClose(enum ExitCode error)
{
if (logFile) {
ErrorFSigSafe("Server terminated %s (%d). Closing log file.\n",
(error == EXIT_NO_ERROR) ? "successfully" : "with error", error);
int msgtype = (error == EXIT_NO_ERROR) ? X_INFO : X_ERROR;
LogMessageVerbSigSafe(msgtype, -1,
"Server terminated %s (%d). Closing log file.\n",
(error == EXIT_NO_ERROR) ? "successfully" : "with error",
error);
fclose(logFile);
logFile = NULL;
logFileFd = -1;