This is the mail archive of the 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]

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

  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.




Want to unsubscribe from this list?
Send a message to