1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext
normal 6a65f2b1e4 io + socket: make pipes and sockets nonblocking by default
All normal Ruby IO methods (IO#read, IO#gets, IO#write, ...) are
all capable of appearing to be "blocking" when presented with a
file description with the O_NONBLOCK flag set; so there is
little risk of incompatibility within Ruby-using programs.

The biggest compatibility risk is when spawning external
programs.  As a result, stdin, stdout, and stderr are now always
made blocking before exec-family calls.

This change will make an event-oriented MJIT usable if it is
waiting on pipes on POSIX_like platforms.

It is ALSO necessary to take advantage of (proposed lightweight
concurrency (aka "auto-Fiber") or any similar proposal for
network concurrency: https://bugs.ruby-lang.org/issues/13618

Named-pipe (FIFO) are NOT yet non-blocking by default since
they are rarely-used and may introduce compatibility problems
and extra syscall overhead for a common path.

Please revert this commit if there are problems and if I am afk
since I am afk a lot, lately.

[ruby-core:89950] [Bug #14968]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-22 08:46:51 +00:00
..
-test- Add more assertions for NotImplementedError of instance method 2018-08-21 14:57:56 +00:00
bigdecimal bigdecimal.c: fix missing argument 2018-03-26 00:25:16 +00:00
cgi/escape Revert "ext/cgi/escape: preserve String subclass in result" 2018-05-03 01:24:09 +00:00
continuation Update dependencies 2016-07-06 05:48:13 +00:00
coverage * expand tabs. 2018-10-20 05:33:13 +00:00
date date_core.c: use static ID variables 2018-11-13 04:51:46 +00:00
dbm Removed needless date attribute from gemspec of default gems. 2018-08-07 12:02:10 +00:00
digest no ID cache in Init functions 2018-02-16 08:39:48 +00:00
etc Retry r65211. 2018-10-20 10:30:42 +00:00
fcntl Removed needless date attribute from gemspec of default gems. 2018-08-07 12:02:10 +00:00
fiber Update dependencies 2016-07-06 05:48:13 +00:00
fiddle fix typo. 2018-10-20 07:40:45 +00:00
gdbm Removed needless date attribute from gemspec of default gems. 2018-08-07 12:02:10 +00:00
io io/console: drop 2.1.0 support [ci skip] 2018-03-02 11:24:29 +00:00
json Removed control characters from gemspec. 2018-10-31 00:13:56 +00:00
nkf ext: check if null byte is contained 2017-09-30 08:35:23 +00:00
objspace support theap for T_HASH. [Feature #14989] 2018-10-30 22:11:51 +00:00
openssl errno.h must be included after config.h because config.h might define 2018-11-21 20:39:09 +00:00
pathname Pathname: Have #relative_path_from accept String argument. 2018-11-13 06:20:06 +00:00
psych Make rubygems follow the upstream of psych 2018-11-11 00:20:27 +00:00
pty [doc] Fix grammar typo in Pty_init() docstring [ci skip] 2018-11-16 04:25:07 +00:00
racc/cparse Update dependencies 2016-07-06 05:48:13 +00:00
rbconfig/sizeof configure.ac 2017-09-29 13:21:17 +00:00
readline readline.c: improve docs 2018-10-12 20:37:30 +00:00
ripper UNREACHABLE_RETURN 2018-07-24 05:38:07 +00:00
rubyvm get rid of test failures introduced at r56848 2016-11-20 06:19:05 +00:00
sdbm Removed needless date attribute from gemspec of default gems. 2018-08-07 12:02:10 +00:00
socket io + socket: make pipes and sockets nonblocking by default 2018-11-22 08:46:51 +00:00
stringio Merge stringio.gemspec from github repository. 2018-10-22 00:32:16 +00:00
strscan Removed needless date attribute from gemspec of default gems. 2018-08-07 12:02:10 +00:00
syslog no ID cache in Init functions 2018-02-16 08:39:48 +00:00
win32 Win32API.rb: use uplevel option to warn 2018-04-02 12:39:01 +00:00
win32ole Fix call-seq of OpenSSL.fips_mode and WIN32OLE_METHOD#name [ci skip] 2018-11-01 07:25:50 +00:00
zlib zlib: fix Zlib::VERSION 2018-10-18 00:55:05 +00:00
.document ext/.document: follow-up r59734 2017-09-03 13:31:34 +00:00
extmk.rb extmk.rb: get rid of shadowing outer local variable 2018-03-25 01:52:22 +00:00
Setup Removed deprecated extensions of mathn. 2017-04-20 08:21:24 +00:00
Setup.atheos * ext/tk: Tk is removed from stdlib. [Feature #8539] 2016-08-09 06:44:45 +00:00
Setup.nt * ext/tk: Tk is removed from stdlib. [Feature #8539] 2016-08-09 06:44:45 +00:00