delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/03/10/23:23:56

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <9603110404.AA13684@clio.rice.edu>
Subject: Re: Itimer/Signal handler bug?
To: drupp AT cs DOT washington DOT edu (Douglas Rupp)
Date: Sun, 10 Mar 1996 22:04:30 -0600 (CST)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <199603071030.CAA27944@june.cs.washington.edu> from "Douglas Rupp" at Mar 7, 96 02:30:55 am

> I ran into a bug with itimers while trying to get FSU's pthreads running with 
> the released version of djgpp v2.  They ran fine with a previous beta.

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
our libc was written/modified by many over much time and probably doesn't
handle reentrancy at all.  But I also remember a very similar program working
in the past, so maybe some modification could be done to fix it.  

And since you can't debug SIGALRM code, this would be a bitch to find.
Sigh.  Which beta did it work under?  The easiest thing to do might be
to swap back.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019