diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-20 09:14:30 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-20 09:14:30 +0000 |
commit | 7adccbb2857e05575a1fe3458da9f8b09f4fc3f4 (patch) | |
tree | 5677268f3c7d79d513cf118a391d13fd059506e1 /io.c | |
parent | ba229f40559da6810dd27f4ff970ad29d7b67259 (diff) |
* io.c (rb_io_ctl): update FMODE_WSPLIT_INITIALIZED and FMODE_WSPLIT
by F_SETFL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -4725,6 +4725,16 @@ rb_io_ctl(io, req, arg, io_p) io_cntl(fileno(fptr->f2), cmd, narg, io_p); } + if (!io_p && cmd == F_SETFL) { + if (narg & O_NONBLOCK) { + fptr->mode |= FMODE_WSPLIT_INITIALIZED; + fptr->mode &= ~FMODE_WSPLIT; + } + else { + fptr->mode &= ~(FMODE_WSPLIT_INITIALIZED|FMODE_WSPLIT); + } + } + return INT2NUM(retval); #else rb_notimplement(); |