1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core
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
..
argf Update to ruby/spec@6f38a82 2018-04-28 19:50:06 +00:00
array Update to ruby/spec@8b743a3 2018-10-27 10:48:40 +00:00
basicobject Update to ruby/spec@4bb0f25 2018-06-13 21:58:54 +00:00
binding Update to ruby/spec@9be7c7e 2018-08-03 16:19:40 +00:00
builtin_constants Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00
class Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
comparable Update to ruby/spec@6f38a82 2018-04-28 19:50:06 +00:00
complex Update to ruby/spec@241f9e7 2018-09-25 10:41:16 +00:00
dir Update to ruby/spec@6f38a82 2018-04-28 19:50:06 +00:00
encoding Revert search_convpath spec 2018-09-29 06:47:32 +00:00
enumerable Update to ruby/spec@8b743a3 2018-10-27 10:48:40 +00:00
enumerator Lazy Enumerator reduce intermediate array creation 2018-09-18 08:49:40 +00:00
env Enumerable#to_h with block and so on 2018-09-20 15:06:56 +00:00
exception Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
false Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00
fiber Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00
file Update to ruby/spec@4bb0f25 2018-06-13 21:58:54 +00:00
filetest Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00
float Update to ruby/spec@241f9e7 2018-09-25 10:41:16 +00:00
gc Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00
hash Update to ruby/spec@8b743a3 2018-10-27 10:48:40 +00:00
integer Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
io io + socket: make pipes and sockets nonblocking by default 2018-11-22 08:46:51 +00:00
kernel Update to ruby/spec@8b743a3 2018-10-27 10:48:40 +00:00
main Update to ruby/spec@6f38a82 2018-04-28 19:50:06 +00:00
marshal Update to ruby/spec@241f9e7 2018-09-25 10:41:16 +00:00
matchdata Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00
math Update to ruby/spec@241f9e7 2018-09-25 10:41:16 +00:00
method use requrie_relative 2018-03-31 11:11:31 +00:00
module Enable refinements at Object#respond_to? 2018-11-22 08:29:02 +00:00
mutex Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00
nil Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00
numeric Update to ruby/spec@241f9e7 2018-09-25 10:41:16 +00:00
objectspace Update to ruby/spec@6f38a82 2018-04-28 19:50:06 +00:00
proc Update to ruby/spec@8b743a3 2018-10-27 10:48:40 +00:00
process Always set autoclose=false for IO.for_fd fds 2018-08-18 19:35:20 +00:00
random Update to ruby/spec@8b743a3 2018-10-27 10:48:40 +00:00
range Update to ruby/spec@8b743a3 2018-10-27 10:48:40 +00:00
rational Update to ruby/spec@241f9e7 2018-09-25 10:41:16 +00:00
regexp Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00
signal Update to ruby/spec@09fa86c 2018-08-27 14:25:00 +00:00
string Update to ruby/spec@8b743a3 2018-10-27 10:48:40 +00:00
struct Update to ruby/spec@8b743a3 2018-10-27 10:48:40 +00:00
symbol Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00
systemexit Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
thread spec/../shared/exit.rb: move the mingw guard to here 2018-10-27 14:06:44 +00:00
threadgroup spec: add comments to re-enable specs for MinGW [ci skip] 2018-10-10 11:39:46 +00:00
time Refine Timezone class in test-spec 2018-11-04 02:02:28 +00:00
tracepoint Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
true Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00
unboundmethod required paths are real paths 2018-03-05 01:57:27 +00:00
warning Update to ruby/spec@c1b568b 2018-03-04 15:09:32 +00:00