From e9e100aa48cfc43a588ee411e1fbb861de956587 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 24 Dec 2003 08:47:36 +0000 Subject: * eval.c (catch_timer): do not call rb_thread_schedule() inside to avoid pthread_mutex_lock() deadlock. interrupts to system calls are detected by TRAP_END via EINTR error. * eval.c (thread_timer): do not post signal unless it is absolutely necessary. * rubysig.h (TRAP_END): add CHECK_INTS to switch thread. * regex.c (re_compile_pattern): check if nextp is smaller than pend. [ruby-dev:22372] * eval.c (umethod_bind): remove method overridden check. [ruby-dev:22366] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index a8ab755758..8f9c9d59b9 100644 --- a/io.c +++ b/io.c @@ -247,7 +247,9 @@ rb_io_check_writable(fptr) io_seek(fptr, 0, SEEK_CUR); } #endif - fptr->mode &= ~FMODE_RBUF; + if (!fptr->f2) { + fptr->mode &= ~FMODE_RBUF; + } } int @@ -309,9 +311,7 @@ io_fflush(f, fptr) rb_io_check_closed(fptr); } for (;;) { - TRAP_BEG; n = fflush(f); - TRAP_END; if (n != EOF) break; if (!rb_io_wait_writable(fileno(f))) rb_sys_fail(fptr->path); -- cgit v1.2.3