diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1996-07-23 08:12:41 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1996-07-23 08:12:41 +0000 |
commit | 45375784668e586efd81b5b89ec43f5717aef456 (patch) | |
tree | d0436dd98f1db946c99dcb6fa52283e84221d9c5 /otherlibs/unix/close.c | |
parent | a246a462931eadb687f0870c22791e2471d90959 (diff) |
select, wait: ajout de enter_blocking_section
close, Unix: changement de closeall.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@936 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/unix/close.c')
-rw-r--r-- | otherlibs/unix/close.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/otherlibs/unix/close.c b/otherlibs/unix/close.c index 41dfca5e9..355b27d23 100644 --- a/otherlibs/unix/close.c +++ b/otherlibs/unix/close.c @@ -20,3 +20,12 @@ value unix_close(fd) /* ML */ if (close(Int_val(fd)) == -1) uerror("close", Nothing); return Val_unit; } + +value unix_closeall(last_fd) /* ML */ + value last_fd; +{ + int fd; + for (fd = 3; fd <= Int_val(last_fd); fd++) close(fd); + return Val_unit; +} + |