errlog: Flush messages before exit
When an exit is requested process all messages before exiting. The atExit flag is set, so no new messages can be added to the buffer.
This commit is contained in:
committed by
Andrew Johnson
parent
b472473ef1
commit
2949f6650e
@@ -495,9 +495,7 @@ static void errlogThread(void)
|
||||
epicsAtExit(exitHandler,0);
|
||||
while (TRUE) {
|
||||
epicsEventMustWait(pvtData.waitForWork);
|
||||
if (pvtData.atExit) break;
|
||||
while ((pmessage = msgbufGetSend(&noConsoleMessage))) {
|
||||
if (pvtData.atExit) break;
|
||||
epicsMutexMustLock(pvtData.listenerLock);
|
||||
if (pvtData.toConsole && !noConsoleMessage) {
|
||||
fprintf(stderr,"%s",pmessage);
|
||||
|
||||
Reference in New Issue
Block a user