* 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
@ -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>
|
Web Mar 5 17:43:43 2008 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||||
|
|
||||||
* transcode.c (transcode_loop): Adjusted detection of invalid
|
* 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
|
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
|
||||||
case EWOULDBLOCK:
|
case EWOULDBLOCK:
|
||||||
#endif
|
#endif
|
||||||
if (op1 & LOCK_NB) goto exit;
|
if (op1 & LOCK_NB) return Qfalse;
|
||||||
rb_thread_polling();
|
rb_thread_polling();
|
||||||
rb_io_check_closed(fptr);
|
rb_io_check_closed(fptr);
|
||||||
continue;
|
continue;
|
||||||
@ -3288,7 +3288,6 @@ rb_file_flock(VALUE obj, VALUE operation)
|
|||||||
rb_sys_fail(fptr->path);
|
rb_sys_fail(fptr->path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exit:
|
|
||||||
#endif
|
#endif
|
||||||
return INT2FIX(0);
|
return INT2FIX(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user