mirror of https://github.com/mkerrisk/man-pages
signal.7: Timeouts make socket interfaces non-restartable
If setsockopt() is used to set a timeout on a socket(), then the various socket interfaces are not automatically restarted, even if SA_RESTART is specified when establishing the signal handler. Analogous behavior occurs for the "stop signals" case. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com> Reported-by: Didier <did447@gmail.com>
This commit is contained in:
parent
132249c496
commit
4f6d71a1fc
|
@ -41,7 +41,7 @@
|
|||
.\" Added section on stop/cont signals interrupting syscalls.
|
||||
.\" 2008-10-05, mtk: various additions
|
||||
.\"
|
||||
.TH SIGNAL 7 2008-10-05 "Linux" "Linux Programmer's Manual"
|
||||
.TH SIGNAL 7 2008-10-15 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
signal \- overview of signals
|
||||
.SH DESCRIPTION
|
||||
|
@ -665,7 +665,8 @@ Socket interfaces:
|
|||
.BR send (2),
|
||||
.BR sendto (2),
|
||||
and
|
||||
.BR sendmsg (2).
|
||||
.BR sendmsg (2),
|
||||
unless a timeout has been set on the socket (see below).
|
||||
.IP *
|
||||
File locking interfaces:
|
||||
.BR flock (2)
|
||||
|
@ -704,6 +705,25 @@ when interrupted by a signal handler:
|
|||
.\" on interruption by a signal handler.
|
||||
.RS 4
|
||||
.IP * 2
|
||||
Socket interfaces, when a timeout has been set on the socket using
|
||||
.BR setsockopt (2):
|
||||
.BR accept (2),
|
||||
.BR recv (2),
|
||||
.BR recvfrom (2),
|
||||
and
|
||||
.BR recvmsg (2),
|
||||
if a receive timeout
|
||||
.RB ( SO_RCVTIMEO )
|
||||
has been set;
|
||||
.BR connect (2),
|
||||
.BR send (2),
|
||||
.BR sendto (2),
|
||||
and
|
||||
.BR sendmsg (2),
|
||||
if a send timeout
|
||||
.RB ( SO_SNDTIMEO )
|
||||
has been set.
|
||||
.IP *
|
||||
Interfaces used to wait for signals:
|
||||
.BR pause (2),
|
||||
.BR sigsuspend (2),
|
||||
|
@ -759,6 +779,25 @@ on other systems.
|
|||
The Linux interfaces that display this behavior are:
|
||||
.RS 4
|
||||
.IP * 2
|
||||
Socket interfaces, when a timeout has been set on the socket using
|
||||
.BR setsockopt (2):
|
||||
.BR accept (2),
|
||||
.BR recv (2),
|
||||
.BR recvfrom (2),
|
||||
and
|
||||
.BR recvmsg (2),
|
||||
if a receive timeout
|
||||
.RB ( SO_RCVTIMEO )
|
||||
has been set;
|
||||
.BR connect (2),
|
||||
.BR send (2),
|
||||
.BR sendto (2),
|
||||
and
|
||||
.BR sendmsg (2),
|
||||
if a send timeout
|
||||
.RB ( SO_SNDTIMEO )
|
||||
has been set.
|
||||
.IP * 2
|
||||
.BR epoll_wait (2),
|
||||
.BR epoll_pwait (2).
|
||||
.IP *
|
||||
|
|
Loading…
Reference in New Issue