Date: Mon, 11 Mar 1996 07:52:52 +0200 (IST) From: Eli Zaretskii To: Charles Sandmann Cc: Douglas Rupp , djgpp-workers AT delorie DOT com Subject: Re: Itimer/Signal handler bug? In-Reply-To: <9603110404.AA13684@clio.rice.edu> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.