diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-05 08:53:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-05 08:53:08 +0000 |
commit | 12551ae5732e83e8ba77cf68c3501529d608c282 (patch) | |
tree | 46f75a96abf7fe74cbbaa1db098ba2a884a18769 /file.c | |
parent | 08631278ada7a6fd2bafb3ab0f0447b1f6d58790 (diff) | |
download | ruby-12551ae5732e83e8ba77cf68c3501529d608c282.tar.gz |
* 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
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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); } |