From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,734c48879e54e7b7,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-03-09 22:25:25 PST Newsgroups: comp.unix.osf.osf1 Path: gmd.de!newsserver.jvnc.net!yale.edu!yale!gumby!wupost!cs.utexas.edu!howland.reston.ans.net!usenet.ins.cwru.edu!news.ecn.bgu.edu!feenix.metronet.com!labiche From: labiche@metronet.com (Maurice LaBiche) Subject: DEC OSF/1 socket read EINTR bug/Normal? Organization: ManyCorps, Inc Date: Thu, 10 Mar 1994 06:25:25 GMT Message-ID: 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