diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-18 18:06:51 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-18 18:06:51 +0000 |
| commit | faf88086c7521fb40eba417b0f6109eb89a351f1 (patch) | |
| tree | dfaa8e88e2cbb32c5846443c61bc9be1f60782ea | |
| parent | bef69a7275f44f35a63df597301846b3479593a4 (diff) | |
| download | ruby-faf88086c7521fb40eba417b0f6109eb89a351f1.tar.gz ruby-faf88086c7521fb40eba417b0f6109eb89a351f1.tar.xz ruby-faf88086c7521fb40eba417b0f6109eb89a351f1.zip | |
* 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
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | io.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Mon Sep 19 03:02:08 2005 Tanaka Akira <akr@m17n.org> + + * 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 <why@ruby-lang.org> * lib/yaml/rubytypes.rb: remove comments that are bungling up @@ -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; |
