mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* file.c (rb_file_flock): returns false on EAGAIN if non-blocking.
[ruby-core:15795] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
08631278ad
commit
12551ae573
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Mar 5 17:53:01 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* file.c (rb_file_flock): returns false on EAGAIN if non-blocking.
|
||||
[ruby-core:15795]
|
||||
|
||||
Web Mar 5 17:43:43 2008 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||
|
||||
* transcode.c (transcode_loop): Adjusted detection of invalid
|
||||
|
|
3
file.c
3
file.c
|
@ -3273,7 +3273,7 @@ rb_file_flock(VALUE obj, VALUE operation)
|
|||
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
|
||||
case EWOULDBLOCK:
|
||||
#endif
|
||||
if (op1 & LOCK_NB) goto exit;
|
||||
if (op1 & LOCK_NB) return Qfalse;
|
||||
rb_thread_polling();
|
||||
rb_io_check_closed(fptr);
|
||||
continue;
|
||||
|
@ -3288,7 +3288,6 @@ rb_file_flock(VALUE obj, VALUE operation)
|
|||
rb_sys_fail(fptr->path);
|
||||
}
|
||||
}
|
||||
exit:
|
||||
#endif
|
||||
return INT2FIX(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue