Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] How to use both select and waitpid ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Berke Durak <berke@a...>
Subject: [Caml-list] Re: How to use both select and waitpid ?
On Fri, Aug 24, 2001 at 03:32:45PM +0200, Gerd Stolpmann wrote:
> For operating systems with POSIX signals, it should work. You need an
> (empty) SIGCHLD signal handler.
> 
> For other operating systems, things may be different. Historically, the BSD
> systems automatically restarted system calls instead of reporting EINTR, and
> you needed to set a flag to avoid that. However, current BSD systems base on
> POSIX signals, too, and restarting does not happen.
> 
> The caml runtime tries to find out whether POSIX signals are available, and
> uses them if possible. If not, it falls back to ANSI-C signals which don't
> specify what to do.
> 
> So your problem depends on the OS, and on whether the caml runtime thinks that
> POSIX signals are available or not. You can check the latter by looking into
> config/s.h (after calling "configure" on the caml sources) and
> checking whether POSIX_SIGNALS is defined.

Thanks ! I've checked config/s.h, POSIX_SIGNALS is indeed defined (I
use OpenBSD 2.9), it works (select raises Unix_error(EINTR,_,_)). I
don't know why it didn't work at work (I used Linux, but that's not
exactly an old BSD system).
--
Berke
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr