Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:michals
ruby2.7
0007-io-document-IO.select_with_poll.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0007-io-document-IO.select_with_poll.patch of Package ruby2.7
From 70d2eee5fd97cfecacf903848f86a9f9de9f4e61 Mon Sep 17 00:00:00 2001 From: Michal Suchanek <msuchanek@suse.de> Date: Tue, 4 Feb 2020 00:51:23 +0100 Subject: [PATCH 07/12] io: document IO.select_with_poll Signed-off-by: Michal Suchanek <msuchanek@suse.de> --- io.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/io.c b/io.c index 0003a6a1db6e..9f1e72a1a2f2 100644 --- a/io.c +++ b/io.c @@ -9445,7 +9445,8 @@ rb_io_advise(int argc, VALUE *argv, VALUE io) /* * call-seq: - * IO.select(read_array [, write_array [, error_array [, timeout]]]) -> array or nil + * IO.select(read_array [, write_array [, except_array [, timeout]]]) -> array or nil + * IO.select_with_poll(read_array [, write_array [, except_array [, error_array [, timeout]]]) -> array or nil * * Calls select(2) system call. * It monitors given arrays of IO objects, waits until one or more of @@ -9453,7 +9454,17 @@ rb_io_advise(int argc, VALUE *argv, VALUE io) * pending exceptions respectively, and returns an array that contains * arrays of those IO objects. It will return +nil+ if optional * <i>timeout</i> value is given and no IO object is ready in - * <i>timeout</i> seconds. + * <i>timeout</i> seconds. Note that 'exceptions' in this context are also + * known as 'priority data' or out-of-band data and dependent on the + * file descriptor type designated by the IO object. select(2) cannot detect + * that the other end of pipe or socket is closed. It can be detected only + * implicitly for sockets used for reading: select returns the socket as ready + * and read returns the error. + * + * On systems that support poll(2) system call IO.select_with_poll is provided + * which takes and returns extra array of descriptors. Descriptors in this + * extra array and all other arrays are checked for error conditions - + * typically the other side closing the pipe or socket. * * IO.select peeks the buffer of IO objects for testing readability. * If the IO buffer is not empty, IO.select immediately notifies -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor