On Mon, 21 Aug 2006 09:19:13 +0200, Jan Djärv <address@hidden> said:
Read the single exception: "when a signal interrupts an unsafe
function and the signal-catching function calls an unsafe function,
the behavior is undefined."
So, you interpret that ``what are interrupted by a signal'' are all
the functions in execution on the whole threads in the process, not
just a single function in execution on the thread that the signal is
delivered to? I don't think that is a natural interpretation.
No, but in the presense of signal handlers executing malloc, there
is no scenario that is safe. Your suggestion also has undefined
behaviour accoding to the quote from the standard.
As I said earlier, the current Emacs implementation calls malloc
within a signal handler with the help of BLOCK_INPUT relying on the
assumption that it is safe unless the signal interrupted
malloc-related functions.