summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/wait.c
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2005-03-24 17:20:54 +0000
committerDamien Doligez <damien.doligez-inria.fr>2005-03-24 17:20:54 +0000
commite6007f6057d1d4e68a5618f232953344b683a168 (patch)
treeee5baa59e5eb0ebc4354bd215bd3c682986bf632 /otherlibs/unix/wait.c
parent958bd6c49292afa23e5fee51770c45d1f8499faa (diff)
fusion des changements jusqu'a 3.08.3
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6824 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/unix/wait.c')
-rw-r--r--otherlibs/unix/wait.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/otherlibs/unix/wait.c b/otherlibs/unix/wait.c
index b660a75e4..5d74b8380 100644
--- a/otherlibs/unix/wait.c
+++ b/otherlibs/unix/wait.c
@@ -15,6 +15,7 @@
#include <mlvalues.h>
#include <alloc.h>
+#include <fail.h>
#include <memory.h>
#include <signals.h>
#include "unixsupport.h"
@@ -60,7 +61,7 @@ static value alloc_process_status(int pid, int status)
return res;
}
-CAMLprim value unix_wait(void)
+CAMLprim value unix_wait(value unit)
{
int pid, status;
@@ -83,11 +84,11 @@ static int wait_flag_table[] = {
CAMLprim value unix_waitpid(value flags, value pid_req)
{
- int pid, status;
-
+ int pid, status, cv_flags;
+
+ cv_flags = convert_flag_list(flags, wait_flag_table);
enter_blocking_section();
- pid = waitpid(Int_val(pid_req), &status,
- convert_flag_list(flags, wait_flag_table));
+ pid = waitpid(Int_val(pid_req), &status, cv_flags);
leave_blocking_section();
if (pid == -1) uerror("waitpid", Nothing);
return alloc_process_status(pid, status);