From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA26811; Sat, 25 Aug 2001 14:54:16 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA26722 for ; Sat, 25 Aug 2001 14:54:15 +0200 (MET DST) Received: from localhost.localdomain (Mix-Montsouris-109-3-238.abo.wanadoo.fr [193.248.102.238]) by concorde.inria.fr (8.11.1/8.10.0) with SMTP id f7PCsDj21237 for ; Sat, 25 Aug 2001 14:54:14 +0200 (MET DST) Received: (qmail 27349 invoked by uid 1001); 25 Aug 2001 12:53:45 -0000 Date: Sat, 25 Aug 2001 14:53:44 +0200 From: Berke Durak To: Gerd Stolpmann Cc: caml-list@inria.fr Subject: [Caml-list] Re: How to use both select and waitpid ? Message-ID: <20010825145344.B24706@localhost.localdomain> References: <20010824144135.C27538@localhost.localdomain> <01082415463809.02716@ice> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <01082415463809.02716@ice>; from info@gerd-stolpmann.de on Fri, Aug 24, 2001 at 03:32:45PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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