* DEC OSF/1 socket read EINTR bug/Normal?
@ 1994-03-10 6:25 Maurice LaBiche
0 siblings, 0 replies; only message in thread
From: Maurice LaBiche @ 1994-03-10 6:25 UTC (permalink / raw)
I've got a process which captures all interrupts and prints
a message listing the signal.
My process uses SIGIO and SIGALRM to perform its task.
SIGALRM is generated via the setitimer(REAL_TIMER,....) routine
so it will repeat.
Both SIGIO and SIGALRM are enabled via the sigaction() routine.
the SIGIO signal has the SIGALRM signal masked via sigaction().
The SIGIO signal also has the SA_RESTART flag set which should
cause the system call to be repeated.
TCP socket 1 - SIGIO - reads in a message from the socket
TCP socket 2 - SIGALRM - polls for incoming messages
UDP socket - SIGALRM - writes data read during SIGIO handler
in the main routine I loop and call pause() so I'm waiting for
either of the SIGIO or SIGALRM signals.
Here's the weird bit, after some period of time a read() call
in the SIGIO handler gets interrupted and returns a value of
ZERO bytes read. Then I check errno which is == to EINTR.
Many suggestions were to re-issue the read after getting into
this state, but this had the same effect eventually. Do I
have to re-issue the read re-cursively to avoid this? This
seems like it would only make the problem worse in the long
run.
What puzzles me is what the heck is interrupting me?
If I'm printing out every signal there is and the SIGIO
can't (via sigaction() masking) be interrupted by the
SIGALRM what is going on?
What signal is it, and how can I find out?
Any and all clues welcome,
Please Email me at
joebloe@usav.com
or labiche@metronet.com
regards,
maurice labiche
--
MoeJoe
joebloe@usav.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1994-03-10 6:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-03-10 6:25 DEC OSF/1 socket read EINTR bug/Normal? Maurice LaBiche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox