1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* file.c (rb_file_flock): use rb_thread_io_blocking_region for the

time being.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-02-20 07:22:57 +00:00
parent 4f00a27fb5
commit 4ab39d2202
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Sun Feb 20 16:22:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_flock): use rb_thread_io_blocking_region for the
time being.
Sun Feb 20 05:33:17 2011 Ryan Davis <ryand-ruby@zenspider.com>
* lib/minitest/*.rb: Imported minitest 2.0.2 r6207.

2
file.c
View file

@ -4058,7 +4058,7 @@ rb_file_flock(VALUE obj, VALUE operation)
if (fptr->mode & FMODE_WRITABLE) {
rb_io_flush(obj);
}
while ((int)rb_thread_blocking_region(rb_thread_flock, op, RUBY_UBF_IO, 0) < 0) {
while ((int)rb_thread_io_blocking_region(rb_thread_flock, op, fptr->fd) < 0) {
switch (errno) {
case EAGAIN:
case EACCES: