From faf88086c7521fb40eba417b0f6109eb89a351f1 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 18 Sep 2005 18:06:51 +0000 Subject: * io.c (io_fwrite): wrap the write system call by TRAP_BEG/TRAP_END to enable signals when writing to a pipe which is full. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ io.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index b3c36758f..24fcb929c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Sep 19 03:02:08 2005 Tanaka Akira + + * io.c (io_fwrite): wrap the write system call by TRAP_BEG/TRAP_END to + enable signals when writing to a pipe which is full. + Sun Sep 18 02:10:47 2005 why the lucky stiff * lib/yaml/rubytypes.rb: remove comments that are bungling up diff --git a/io.c b/io.c index e3bc73a2d..78333d1d2 100644 --- a/io.c +++ b/io.c @@ -437,7 +437,9 @@ io_fwrite(str, fptr) wsplit_p(fptr)) { l = PIPE_BUF; } + TRAP_BEG; r = write(fileno(f), RSTRING(str)->ptr+offset, l); + TRAP_END; if (r == n) return len; if (0 <= r) { offset += r; -- cgit