2016-12-17 20:47 GMT+03:00 Peter Dimov
Antony Polukhin wrote:
Actually, it's the other way around: everything is async-signal unsafe https://msdn.microsoft.com/en-us/en-en/library/xdkz3x12.aspx :
"Do not use any function that generates a system call (for example, _getcwd or time)."
There are no signals on Windows. They just don't exist. The signal function is provided by the C runtime and emulates signals.
The closest thing to a signal are the Ctrl+C and Ctrl+Break keyboard interrupts, and they spawn a new thread to call the handler, instead of reusing one as a POSIX signal would do.
Ok, but the signal documentation does not allow to use a lot of functions in signal handlers (syscalls, malloc, printf...). Am I allowed to use COM functions in signal handlers? -- Best regards, Antony Polukhin