summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-20 09:14:30 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-20 09:14:30 +0000
commit7adccbb2857e05575a1fe3458da9f8b09f4fc3f4 (patch)
tree5677268f3c7d79d513cf118a391d13fd059506e1 /io.c
parentba229f40559da6810dd27f4ff970ad29d7b67259 (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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/io.c b/io.c
index 746add0025..e0e48ac3bc 100644
--- a/io.c
+++ b/io.c
@@ -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();