caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Johan Grande <johan.grande@ens-cachan.org>
To: caml users <caml-list@inria.fr>
Subject: [Caml-list] Child process doesn't terminate
Date: Mon, 24 Mar 2014 19:23:05 +0100	[thread overview]
Message-ID: <53307809.80202@ens-cachan.org> (raw)

Hi,

In the following program, the child process "cat" never terminates. I 
don't understand why; can anyone tell me?

~~~
let _ =
   let open Unix in
   let indescr, outdescr = pipe () in
   let outchan = out_channel_of_descr outdescr in
   let pid =
     create_process "/bin/cat" [|"cat"|]
       indescr  stdout  stderr
   in
   Printf.fprintf outchan "Hello!\n%!";
   close indescr;
   close outdescr;
   ignore (waitpid [] pid)  (* stuck here *)
~~~

-- 
Johan Grande

             reply	other threads:[~2014-03-24 18:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24 18:23 Johan Grande [this message]
2014-03-24 21:28 ` Gerd Stolpmann
2014-03-24 23:59   ` Johan Grande
2014-03-24 22:55 ` oliver
2014-03-25  0:10   ` Johan Grande

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=53307809.80202@ens-cachan.org \
    --to=johan.grande@ens-cachan.org \
    --cc=caml-list@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).