* 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
This commit is contained in:
nobu 2004-06-22 15:00:36 +00:00
parent e99c018d87
commit 65e0e64656
2 changed files with 4 additions and 1 deletions

View File

@ -1,8 +1,10 @@
Tue Jun 22 23:59:17 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
Wed Jun 23 00:00:25 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (return_jump, break_jump): raise unexpceted local jump
exception directly. [ruby-dev:23740]
* io.c (rb_io_initialize): should check fcntl result. [ruby-dev:23742]
Tue Jun 22 23:35:43 2004 NAKAMURA Usaku <usa@ruby-lang.org>
* sprintf.c (rb_f_sprintf): support FZERO and FSPACE with NaN/Inf.

1
io.c
View File

@ -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