1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

doc: Clarify behavior of 'select' in the presence of signal interruptions.

Fixes <http://bugs.gnu.org/18988>.
Reported by Chris Vine <chris@cvine.freeserve.co.uk>.

* libguile/filesys.c (scm_select): Clarify handling of signal
  interruptions.
* doc/ref/posix.texi (Ports and File Descriptors): Adjust accordingly.
This commit is contained in:
Ludovic Courtès 2014-11-20 21:32:44 +01:00
parent 136c3a4c4a
commit d1447c717b
2 changed files with 12 additions and 3 deletions

View file

@ -567,7 +567,11 @@ This procedure has a variety of uses: waiting for the ability
to provide input, accept output, or the existence of to provide input, accept output, or the existence of
exceptional conditions on a collection of ports or file exceptional conditions on a collection of ports or file
descriptors, or waiting for a timeout to occur. descriptors, or waiting for a timeout to occur.
It also returns if interrupted by a signal.
When an error occurs, of if it is interrupted by a signal, this
procedure throws a @code{system-error} exception
(@pxref{Conventions, @code{system-error}}). In case of an
interruption, the associated error number is @var{EINTR}.
@var{reads}, @var{writes} and @var{excepts} can be lists or @var{reads}, @var{writes} and @var{excepts} can be lists or
vectors, with each member a port or a file descriptor. vectors, with each member a port or a file descriptor.

View file

@ -771,8 +771,13 @@ SCM_DEFINE (scm_select, "select", 3, 2, 0,
"This procedure has a variety of uses: waiting for the ability\n" "This procedure has a variety of uses: waiting for the ability\n"
"to provide input, accept output, or the existence of\n" "to provide input, accept output, or the existence of\n"
"exceptional conditions on a collection of ports or file\n" "exceptional conditions on a collection of ports or file\n"
"descriptors, or waiting for a timeout to occur.\n" "descriptors, or waiting for a timeout to occur.\n\n"
"It also returns if interrupted by a signal.\n\n"
"When an error occurs, of if it is interrupted by a signal, this\n"
"procedure throws a @code{system-error} exception\n"
"(@pxref{Conventions, @code{system-error}}). In case of an\n"
"interruption, the associated error number is @var{EINTR}.\n\n"
"@var{reads}, @var{writes} and @var{excepts} can be lists or\n" "@var{reads}, @var{writes} and @var{excepts} can be lists or\n"
"vectors, with each member a port or a file descriptor.\n" "vectors, with each member a port or a file descriptor.\n"
"The value returned is a list of three corresponding\n" "The value returned is a list of three corresponding\n"