caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Eric Cooper <ecc@cmu.edu>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Freezing
Date: Tue, 23 May 2006 09:24:14 -0400	[thread overview]
Message-ID: <20060523132414.GC16364@localhost> (raw)
In-Reply-To: <1148353431.19894.19.camel@rosella.wigram>

On Tue, May 23, 2006 at 01:03:51PM +1000, skaller wrote:
> On Tue, 2006-05-23 at 02:04 +0200, David Baelde wrote:
> > flush_all () ;
> > let pid = Unix.fork () in
> > if pid = 0 then begin
> >   ignore (Unix.alarm 20) ;
> >   Fetch.cp there here ;
> >   exit 0
> > end else
> >   Unix.waitpid [] pid
> [...]
> The moral is -- use threads or processes but not both
> together, Unix can't handle it. 

Or at least, don't use fork without an almost-immediate exec.
In this particular case, the OP might consider using exec to run a
standalone program in the child -- perhaps cp or wget -- if there's
not a lot of state shared with the parent.

-- 
Eric Cooper             e c c @ c m u . e d u


  reply	other threads:[~2006-05-23 13:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-23  0:04 Freezing David Baelde
2006-05-23  3:03 ` [Caml-list] Freezing skaller
2006-05-23 13:24   ` Eric Cooper [this message]
2006-05-24 15:51   ` David Baelde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060523132414.GC16364@localhost \
    --to=ecc@cmu.edu \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).