Mail Archives: djgpp-workers/1996/03/11/01:01:27
On Sun, 10 Mar 1996, Charles Sandmann wrote:
> The problem in the test program is that the signal handler does a printf -
> and this somehow hoses the I/O library. If you remove the printf and just
> increment a variable instead it works. If you change the printf to a
> "cprintf" it also works. This actually doesn't surprise me too much, since
`printf' calls DOS. If there is anything signal handlers should avoid,
it's calling DOS functions, even if it sometimes works. Low-level
library functions might also be subtly non-reentrant if whoever
interrupts them in the middle uses the transfer buffer (like `printf', or
any other function that calls real-mode services) does.
- Raw text -