diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-18 18:29:19 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-18 18:29:19 +0000 |
commit | 1ad103b7f83ccd0229ed3f61ef2de8c832cb329b (patch) | |
tree | 7a8c980e56d242a2bf535d052e4a6e7a5129d7af /file.c | |
parent | 9af6e57230e0c47b91b249e1892f444d0f9cea2b (diff) |
* file.c (rb_thread_flock): wrap the flock system call by
TRAP_BEG/TRAP_END to enable signals. [ruby-dev:27122]
* ext/socket/socket.c (bsock_send): wrap the sendto and send system
call by TRAP_BEG/TRAP_END to enable signals when writing to a socket
which is full. [ruby-dev:27132]
* io.c (rb_io_syswrite): wrap the write system call by
TRAP_BEG/TRAP_END to run signal hander in syswrite method.
[ruby-dev:27134]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2884,7 +2884,11 @@ static int rb_thread_flock(int fd, int op, OpenFile *fptr) { if (rb_thread_alone() || (op & LOCK_NB)) { - return flock(fd, op); + int ret; + TRAP_BEG; + ret = flock(fd, op); + TRAP_END; + return ret; } op |= LOCK_NB; while (flock(fd, op) < 0) { |