Subject: | |
From: | |
Reply To: | |
Date: | Tue, 31 Oct 1995 01:10:54 GMT |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Eric Schubert ([log in to unmask]) wrote:
: At 02:40 PM 10/25/95 +1000, Jim Wowchuk wrote:
: >At 09:01 AM 24/10/95 -0400, Eric Schubert wrote:
: >>Posix signals - blah!
^^^^^^^^^^^^^^^^^^^^^^^^^^
I heard that!
[snip - select gets EINTR, EINTR means a signal arrived during select]
: This is highly suspect since the EINTR only happens just after this server
: terminates a process it created - then never again until timeout value. I
: think it is Posix signals crossed into BSD on the SELECT.
I believe you must be right. The select and HPSELECT interfaces end up in
the same underlying code, therefore the behavior should be radically the same.
A child termination causes a SIGCHLD signal on the parent, always. Ignoring
this is a normal thing to do, so returning to your loop after an EINTR will
be correct 99% of the time. If you link with POSIX, you can run a test to
see what signal is coming in. Set _all_ the signals to go to a handler that
prints out the signal number and use /usr/include/signal.h to map that back
to the signal name. Simply having the handler defined may cause select to
ignore the signal since one normally never comes back from these handlers.
If not, just set a flag saying it's ok to ignore this EINTR from the handler
and then check it and clear it in the loop.
Steve
|
|
|