Skip to content

Commit

Permalink
syscall bug
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed May 25, 1999
1 parent 2a7104f commit 1aba398
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions io.c
Expand Up @@ -707,6 +707,7 @@ argf_set_lineno(argf, val)
{
gets_lineno = NUM2INT(val);
lineno = INT2FIX(gets_lineno);
return Qnil;
}

static VALUE
Expand Down Expand Up @@ -865,8 +866,6 @@ static void
rb_io_fptr_close(fptr)
OpenFile *fptr;
{
int fd;

if (fptr->f == NULL && fptr->f2 == NULL) return;
rb_thread_fd_close(fileno(fptr->f));

Expand Down Expand Up @@ -2322,7 +2321,6 @@ rb_f_select(argc, argv, obj)
int i, max = 0, n;
int interrupt_flag = 0;
int pending = 0;
VALUE io;

rb_scan_args(argc, argv, "13", &read, &write, &except, &timeout);
if (NIL_P(timeout)) {
Expand Down Expand Up @@ -2640,8 +2638,8 @@ rb_f_syscall(argc, argv)
#endif /* atarist */
}
TRAP_END;
if (retval == -1) rb_sys_fail(0);
return INT2FIX(0);
if (retval < 0) rb_sys_fail(0);
return INT2NUM(retval);
#else
rb_notimplement();
return Qnil; /* not reached */
Expand Down

0 comments on commit 1aba398

Please sign in to comment.