Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Feb 2001 15:48:43 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Jonathan Graehl <jonathan@graehl.org>
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: nonblocking sockets and EINTR
Message-ID:  <20010205154842.J26076@fw.wintelcom.net>
In-Reply-To: <NCBBLOALCKKINBNNEDDLOEFNDKAA.jonathan@graehl.org>; from jonathan@graehl.org on Mon, Feb 05, 2001 at 03:46:20PM -0800
References:  <NCBBLOALCKKINBNNEDDLOEFNDKAA.jonathan@graehl.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Jonathan Graehl <jonathan@graehl.org> [010205 15:46] wrote:
> If a TCP or UDP socket is set nonblocking, do I ever have to worry about getting
> my system calls for those sockets interrupted?  It is my understanding that you
> should only have to check for EINTR for "slow" system calls (that can take an
> indefinite amount of time), which should mean I'm home free, since the operation
> either completes immediately, or I get EWOULDBLOCK.
> 
> For now, since I am not sure I can count on this behavior, I block all nonfatal
> signals.  I would like to be able to use signals to communicate to my daemon
> (with the caveat that I may get an EINTR for my kevent call, but not for any of
> my socket operations).
> 
> Is there any standard behavior I can count on for nonblocking sockets w.r.t.
> EINTR?

You can specify that syscalls will or won't be automatically
restarted via the sigaction() API.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010205154842.J26076>