"Ángel González" <address@hidden> wrote:
+ event == CTRL_SHUTDOWN_EVENT ? "CTRL_SHUTDOWN_EVENT" :
+ "?");
Better something like "UNKNOWN EVENT" ?
Ok. That seems better.
PS. The above Sleep() seems to be ignored by WinCon. At least I failed to
make it sleep more than ~500 msec.
There may be a timeout on how long you can stay processing the event.
Why do you need that Sleep() call at all? I would remove it.
When logging to the console (no '-o log-file' option), the Sleep(500) will make
the final "... cleanup." message stay a tiny bit longer (but barely readable).
Without a Sleep(), the console gets closed with only a message-beep.