Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: labiche@metronet.com (Maurice LaBiche)
Subject: DEC OSF/1 socket read EINTR bug/Normal?
Date: Thu, 10 Mar 1994 06:25:25 GMT	[thread overview]
Message-ID: <CMFr6D.Fwr@metronet.com> (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


                 reply	other threads:[~1994-03-10  6:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox