This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: B20.1: Returning from pause() before signal handler runs?



On Thu, Mar 25, 1999 at 02:02:53PM +0000, Richard.Hirst@net-tel.co.uk wrote:
>Hi,
>  I am running "sendmail -q1" under B20.1 on NT4.0 SP3.  This should poll a
>queue directory once a minute, but I find that after a few polls it goes to
>sleep.  I have provided a small test program which shows the problem.
>The parent installs ALRM and CHLD signal handlers, forks a child,
>requests an alarm tick., and calls pause().  The child exits.  Sometimes
>the child exits before the parent calls pause(), sometimes not.  The
>signal handlers increment counts each time they run.  The parent notes
>these counts before calling pause, and again after returning from pause().
>Sometimes the parent finds that the counts havn't changed; it does a
>printf() and checks the counts again - now they have changed.
>
>It looks to me as though the parent is returning from pause() before
>the signal handler has been run.  
>
>I can provoke the problem within a few cycles if I run a couple of
>copies of the program and then start up a few other programs (DevStudio,
>MSDOS boxes, etc).  This is on a PII-233 with 64MB, NT4.0 SP3.
>
>If anyone could reproduce the problem, and say whether it looks like
>a cygwin bug or not, I'd appreciate it.

Looking at the code, it does appear to be a bug.  I've fixed the problem
and it will be in the next snapshot.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com