caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Child process doesn't terminate
@ 2014-03-24 18:23 Johan Grande
  2014-03-24 21:28 ` Gerd Stolpmann
  2014-03-24 22:55 ` oliver
  0 siblings, 2 replies; 5+ messages in thread
From: Johan Grande @ 2014-03-24 18:23 UTC (permalink / raw)
  To: caml users

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-25  0:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-24 18:23 [Caml-list] Child process doesn't terminate Johan Grande
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

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).