🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3262

Re: select failed: Interrupted system call

#3262
From: Rick Johns
Date: Thu, 24 Mar 1994 19:37
25 lines
1941 bytes
|> Patrick Coghlan <coghlan@bcarh5f8.bnr.ca> wrote:
|> I have a 1-second interval timer running in my application and I catch
|> the SIGALRM signal for it.
|> 
|> The documentation for signal says that the process will resume
|> execution at the point where it was interrupted, although some
|> READ/WRITE etc. to SLOW devices (not files) will fail.
|> 
|> Well, I am using SELECT to suspend my application for 100 ms
|> while polling and I get "select failed: Interrupted system call"
|> messages every time the interval timer goes off (my application is
|> usually suspended).  I don't mind the select() failing, but I don't
|> want this silly message being displayed.

Try setting the sigcontext sc_syscall_action field to SIG_RESTART in 
the handler.  That allows the system call to restart, which should
avoid the problem.  I think this is an HP-specific thing, though.

-- 
Cheers,
 Rick Johns
 BNR
 rjohns@bnr.ca

Disclaimer: I said it, BNR didn't.
Technical Details
Message-ID: <1994Mar24.193759.27805@bmers95.bnr.ca>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!udel!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!convex!news.utdallas.edu!corpgate!bnrgate!bmers95!brtph46!rjohns
References: <1994Mar24.142710.11199@bcarh54a.bnr.ca> <2msijo$602@news.iastate.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 14b500,6ef1c459f8d64db7
X-Google-Attributes: gid14b500,public
X-Google-Thread: fc89c,6ef1c459f8d64db7
X-Google-Attributes: gidfc89c,public
X-Google-Thread: fcda7,6ef1c459f8d64db7
X-Google-Attributes: gidfcda7,public
X-Google-ArrivalTime: 1994-03-24 11:37:59 PST
Newsgroups: comp.unix.programmer,comp.sys.hp.hpux,bnr.unix
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!udel!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!convex!news.utdallas.edu!corpgate!bnrgate!bmers95!brtph46!rjohns
From: rjohns@brtph46.bnr.ca (Rick Johns)
Subject: Re: select failed: Interrupted system call
Message-ID: <1994Mar24.193759.27805@bmers95.bnr.ca>
Sender: usenet@bmers95.bnr.ca
Organization: Bell-Northern Research, Ottawa, Canada
References: <1994Mar24.142710.11199@bcarh54a.bnr.ca> <2msijo$602@news.iastate.edu>
Date: Thu, 24 Mar 1994 19:37:59 GMT
Lines: 25