diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-22 15:00:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-22 15:00:36 +0000 |
commit | 65e0e64656f24488e1a17cd91a3a3de02ee27a78 (patch) | |
tree | 08aff68b1c3c9e6feac23013e96047771783db1f /io.c | |
parent | e99c018d87163c099ea9ca5dc31127552ce160c3 (diff) | |
download | ruby-65e0e64656f24488e1a17cd91a3a3de02ee27a78.tar.gz |
* io.c (rb_io_initialize): should check fcntl result. [ruby-dev:23742]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -3851,6 +3851,7 @@ rb_io_initialize(argc, argv, io) else if (!ofp) { #if defined(HAVE_FCNTL) && defined(F_GETFL) flags = fcntl(fd, F_GETFL); + if (flags == -1) rb_sys_fail(0); #else flags = O_RDONLY; #endif |