Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwvax!zazen!uakari.primate.wisc.edu!ames!lll-winken!uunet!bu.edu!bucsf.bu.edu!jdubb From: jdubb@bucsf.bu.edu (jay dubb) Newsgroups: comp.unix.programmer Subject: EINTR on recvfrom() - how to block the signal? Message-ID: <77135@bu.edu.bu.edu> Date: 18 Mar 91 03:17:12 GMT Sender: news@bu.edu.bu.edu Distribution: usa Organization: Computer Science Department, Boston University, Boston, MA, USA Lines: 14 Originator: jdubb@bucsf.bu.edu I am posting this for a friend of mine who doesn't have access to USENET, so please respond directly to mlevin@jade.tufts.edu. I have recvfrom() call in my code that attempts to read a UDP socket message, and is returning -1 and setting errno to EINTR - interrupted system call (as far as I can tell, this is the signal caused by one of the child processes dying). What exactly does an interrupted recvfrom() do? Can I temporarily disable signal delivery around the call (but making sure the signal is delivered after the call completes)? If so, is this a good idea, provided I want to catch the message, and the signal also? If not, what should I do? Thanks in advance. Mike Levin (mlevin@jade.tufts.edu)