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 | |
parent | ba229f40559da6810dd27f4ff970ad29d7b67259 (diff) | |
download | ruby-7adccbb2857e05575a1fe3458da9f8b09f4fc3f4.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | io.c | 10 |
2 files changed, 15 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Wed Jul 20 18:07:11 2005 Tanaka Akira <akr@m17n.org> + + * io.c (rb_io_ctl): update FMODE_WSPLIT_INITIALIZED and FMODE_WSPLIT + by F_SETFL. + Wed Jul 20 10:04:51 2005 Yukihiro Matsumoto <matz@ruby-lang.org> * variable.c (rb_class_path): need to adjust snprintf() len for @@ -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(); |