[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/01: doc: Clarify behavior of 'select' in the presence
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 01/01: doc: Clarify behavior of 'select' in the presence of signal interruptions. |
Date: |
Thu, 20 Nov 2014 20:32:54 +0000 |
civodul pushed a commit to branch stable-2.0
in repository guile.
commit d1447c717bd90f00b53da87b8b9a80d5fcb41f39
Author: Ludovic Courtès <address@hidden>
Date: Thu Nov 20 21:32:44 2014 +0100
doc: Clarify behavior of 'select' in the presence of signal interruptions.
Fixes <http://bugs.gnu.org/18988>.
Reported by Chris Vine <address@hidden>.
* libguile/filesys.c (scm_select): Clarify handling of signal
interruptions.
* doc/ref/posix.texi (Ports and File Descriptors): Adjust accordingly.
---
doc/ref/posix.texi | 6 +++++-
libguile/filesys.c | 9 +++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi
index acf1727..ad5460c 100644
--- a/doc/ref/posix.texi
+++ b/doc/ref/posix.texi
@@ -567,7 +567,11 @@ This procedure has a variety of uses: waiting for the
ability
to provide input, accept output, or the existence of
exceptional conditions on a collection of ports or file
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
vectors, with each member a port or a file descriptor.
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 301040a..b473af8 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -771,8 +771,13 @@ SCM_DEFINE (scm_select, "select", 3, 2, 0,
"This procedure has a variety of uses: waiting for the ability\n"
"to provide input, accept output, or the existence of\n"
"exceptional conditions on a collection of ports or file\n"
- "descriptors, or waiting for a timeout to occur.\n"
- "It also returns if interrupted by a signal.\n\n"
+ "descriptors, or waiting for a timeout to occur.\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"
"vectors, with each member a port or a file descriptor.\n"
"The value returned is a list of three corresponding\n"