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/select.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/select.c')
-rw-r--r-- | otherlibs/unix/select.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/otherlibs/unix/select.c b/otherlibs/unix/select.c index bacd810d4..7b4e6aaeb 100644 --- a/otherlibs/unix/select.c +++ b/otherlibs/unix/select.c @@ -14,6 +14,7 @@ #include <mlvalues.h> #include <alloc.h> #include <memory.h> +#include <signals.h> #include "unix.h" #ifdef HAS_SELECT @@ -91,7 +92,9 @@ value unix_select(readfds, writefds, exceptfds, timeout) /* ML */ tv.tv_usec = (int) (1e6 * (tm - (int) tm)); tvp = &tv; } + enter_blocking_section(); retcode = select(FD_SETSIZE, &read, &write, &except, tvp); + leave_blocking_section(); if (retcode == -1) uerror("select", Nothing); read_list = fdset_to_fdlist(&read); write_list = fdset_to_fdlist(&write); |