diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2002-05-07 07:37:18 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2002-05-07 07:37:18 +0000 |
commit | 219958e0df87a58c2a7b6d35d4020f436acb128c (patch) | |
tree | e0777da08f77f1591d8e0ad62e7c3d8f4fda4e5f /otherlibs/unix/select.c | |
parent | fa704a8e7b5dfd48619b6aa63a50cfb960a4870f (diff) |
Erreur de poteau sur le premier parametre de maxfd
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4779 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/unix/select.c')
-rw-r--r-- | otherlibs/unix/select.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/otherlibs/unix/select.c b/otherlibs/unix/select.c index e512b3043..43de97709 100644 --- a/otherlibs/unix/select.c +++ b/otherlibs/unix/select.c @@ -73,7 +73,7 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value res; Begin_roots3 (readfds, writefds, exceptfds); - maxfd = 0; + maxfd = -1; fdlist_to_fdset(readfds, &read, &maxfd); fdlist_to_fdset(writefds, &write, &maxfd); fdlist_to_fdset(exceptfds, &except, &maxfd); @@ -86,7 +86,7 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, tvp = &tv; } enter_blocking_section(); - retcode = select(maxfd, &read, &write, &except, tvp); + retcode = select(maxfd + 1, &read, &write, &except, tvp); leave_blocking_section(); if (retcode == -1) uerror("select", Nothing); readfds = fdset_to_fdlist(readfds, &read); |