From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 5C5737F890 for ; Tue, 25 Mar 2014 01:10:06 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of johan.grande@ens-cachan.org) identity=pra; client-ip=138.231.136.39; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="johan.grande@ens-cachan.org"; x-sender="johan.grande@ens-cachan.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of johan.grande@ens-cachan.org) identity=mailfrom; client-ip=138.231.136.39; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="johan.grande@ens-cachan.org"; x-sender="johan.grande@ens-cachan.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@redisdead.crans.org) identity=helo; client-ip=138.231.136.39; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="johan.grande@ens-cachan.org"; x-sender="postmaster@redisdead.crans.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap0BAObIMFOK54gnl2dsb2JhbABZgmWEOrxegw6BIhYOAQEBAQEIFgc8giUBAQEEIw8BBUABEAsYAgIFFgsCAgkDAgECAUUGDQEHAQGHdQGsVaJTF4EpjVEHgm+BSQEDrimBaAc X-IPAS-Result: Ap0BAObIMFOK54gnl2dsb2JhbABZgmWEOrxegw6BIhYOAQEBAQEIFgc8giUBAQEEIw8BBUABEAsYAgIFFgsCAgkDAgECAUUGDQEHAQGHdQGsVaJTF4EpjVEHgm+BSQEDrimBaAc X-IronPort-AV: E=Sophos;i="4.97,723,1389740400"; d="scan'208";a="64537050" Received: from redisdead.crans.org ([138.231.136.39]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 25 Mar 2014 01:10:06 +0100 Received: from [IPv6:2a01:e35:2e3e:5200:baca:3aff:fed9:652d] (unknown [IPv6:2a01:e35:2e3e:5200:baca:3aff:fed9:652d]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by redisdead.crans.org (Postfix) with ESMTPSA id 5DAC51331; Tue, 25 Mar 2014 01:10:05 +0100 (CET) Message-ID: <5330C95A.4050506@ens-cachan.org> Date: Tue, 25 Mar 2014 01:10:02 +0100 From: Johan Grande User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: oliver CC: caml users References: <53307809.80202@ens-cachan.org> <20140324225558.GA13355@siouxsie> In-Reply-To: <20140324225558.GA13355@siouxsie> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] Child process doesn't terminate Le 24/03/2014 23:55, oliver a écrit : > On Mon, Mar 24, 2014 at 07:23:05PM +0100, Johan Grande wrote: >> In the following program, the child process "cat" never terminates. >> I don't understand why; can anyone tell me? >> >> [...] > > With > > create_process "/bin/cat" [| "cat"; "/etc/passwd" |] > > cat would terminate after cat'ing the file, > otherwise it reads from input until Ctrl-D arrives, > before printing the data and then terminates. Yes, but if I'm not mistaken I can't just send Ctrl+D to the process. The equivalent here is to close the channel; Gerd pointed out how to do this properly. -- Johan