summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-18 18:06:51 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-18 18:06:51 +0000
commit94636e83dc72518ff26d18ce248bd9fa1f87c234 (patch)
treedfaa8e88e2cbb32c5846443c61bc9be1f60782ea /io.c
parent06c4c45f7f731bbf9adb214b2963760754a69f5d (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io.c b/io.c
index e3bc73a2dd..78333d1d22 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;