diff options
Diffstat (limited to 'otherlibs/unix/fchmod.c')
-rw-r--r-- | otherlibs/unix/fchmod.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/otherlibs/unix/fchmod.c b/otherlibs/unix/fchmod.c index a6e8ee903..ba5e55721 100644 --- a/otherlibs/unix/fchmod.c +++ b/otherlibs/unix/fchmod.c @@ -21,7 +21,11 @@ CAMLprim value unix_fchmod(value fd, value perm) { - if (fchmod(Int_val(fd), Int_val(perm)) == -1) uerror("fchmod", Nothing); + int result; + caml_enter_blocking_section(); + result = fchmod(Int_val(fd), Int_val(perm)); + caml_leave_blocking_section(); + if (result == -1) uerror("fchmod", Nothing); return Val_unit; } |