summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/file.c b/file.c
index 818d8087be..0f35ec0743 100644
--- a/file.c
+++ b/file.c
@@ -2915,7 +2915,11 @@ rb_thread_flock(fd, op, fptr)
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) {