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 NAA07758; Thu, 20 Dec 2001 13:25:32 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA07551 for caml-list@pauillac.inria.fr; Thu, 20 Dec 2001 13:25:32 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA26064 for ; Wed, 19 Dec 2001 18:35:02 +0100 (MET) Received: from scan2.fhg.de (scan2.fhg.de [153.96.1.37]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id fBJHZ2105605 for ; Wed, 19 Dec 2001 18:35:02 +0100 (MET) Received: from scan2.fhg.de (localhost [127.0.0.1]) by scan2.fhg.de (8.11.1/8.11.1) with ESMTP id fBJHYwL22989 for ; Wed, 19 Dec 2001 18:34:58 +0100 (MET) Received: from kso.ilt.fhg.de (eeltc2.llt.RWTH-Aachen.DE [137.226.44.2]) by scan2.fhg.de (8.11.1/8.11.1) with ESMTP id fBJHYq622969 for ; Wed, 19 Dec 2001 18:34:53 +0100 (MET) Received: from ilt.fhg.de (ilt.ilt.fhg.de [153.96.180.2]) by kso.ilt.fhg.de (8.11.1/8.11.1) with ESMTP id fBJHbDD23005 for ; Wed, 19 Dec 2001 18:37:13 +0100 (MET) Received: from eent359 (localhost [127.0.0.1]) by ilt.fhg.de (8.11.1/8.11.1) with ESMTP id fBJHZEl14350 for ; Wed, 19 Dec 2001 18:35:14 +0100 (MET) From: "Rolf Wester" To: caml-list@pauillac.inria.fr Date: Wed, 19 Dec 2001 18:34:49 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: [Caml-list] Unix.create_process Message-ID: <3C20DDC9.22969.A60E35F@localhost> X-mailer: Pegasus Mail for Win32 (v3.12cDE) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I want to start a process and read the stdout channel of this process. I tried: let instring = String.create 10 in let pid = Unix.create_process ~prog:"ls" ~args:[|"/usr"|] ~stdin:Unix.stdin ~stdout:Unix.stdin ~stderr:Unix.stderr in let nread = Unix.read Unix.stdin ~buf:instring ~pos:0 ~len:10 in instring;; but this one waits for keyboeard input instead of reading the output of ls. When I type ~stdout:Unix.stdout instead of ~stdout:Unix.stdin the ls output is written to stdout (as expected). Can anybody tell me what I made wrong? Thanks in advance. Rofl Wester ------------------------------------- Rolf Wester rolf.wester@ilt.fraunhofer.de ------------------- 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