It is my understanding that an unmasked signal will always interrupt a call to
kevent, even if SA_RESTART is specified in sigaction, or siginterrupt(signo, 0)
is used.
Can this be officially documented so that it can be relied upon? I want signals
to interrupt kevent; I would like to be able to use SA_RESTART so that I don't
have to check for an EINTR except from kevent, but I wouldn't want kevent
restarted for me should the implementation change out from under me.
Other signal interrupt / restart questions:
Can a signal ever interrupt a (nonblocking) datagram write/read (possibly
truncating a datagram due to a partial read/write count)? (my guess: not unless
you're sleeping awaiting a datagram with a blocking read) Is this behavior
documented?
Can a signal ever interrupt an I/O on a nonblocking fd, such that the I/O will
return EINTR rather than EAGAIN or a partial success? (my guess: no, I don't
need to check for EINTR for nonblocking fds even if I siginterrupt(signo, 1))
Is this documented?
I currently use SA_RESTART, assume that EINTR will never be returned, except I
expect EINTR to be returned immediately by kevent so I can get my signal and
process it in a synchronous fashion outside of my event handling logic. Relying
on undocumented behavior makes me nervous. Are there any other system calls I
should worry about returning EINTR even when I specify SA_RESTART?
Thanks,
--
Jonathan Graehl
http://jonathan.graehl.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message