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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id EEE997EDC2 for ; Wed, 21 Nov 2012 22:19:19 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of mmatalka@gmail.com) identity=pra; client-ip=209.85.217.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of mmatalka@gmail.com designates 209.85.217.182 as permitted sender) identity=mailfrom; client-ip=209.85.217.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-lb0-f182.google.com) identity=helo; client-ip=209.85.217.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="postmaster@mail-lb0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnACAIpErVDRVdm2m2dsb2JhbABEgmyCbbw1CBYOAQEBAQEICQsJFCeCHgEBBAFAARsdAQMBCwYFISUPAQQNAhEBBQEiE4d6AQMJBgGgXIwygniFGQoZJw1ZiHUBBQyLP4VMA4hciXCBXY0Hgy8/hC4 X-IronPort-AV: E=Sophos;i="4.83,295,1352070000"; d="scan'208";a="163360959" Received: from mail-lb0-f182.google.com ([209.85.217.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Nov 2012 22:19:19 +0100 Received: by mail-lb0-f182.google.com with SMTP id go10so6372885lbb.27 for ; Wed, 21 Nov 2012 13:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=44Py8sxwENd3DSFhyuLonal89AYcONmpEmBngFAVTnQ=; b=hUVecPEbxHeE7IviCCPjtc55qRKNb5uHy5qaQPIyq3DCXqId4QwVlgNEJR27IKwStI BhHsI7j+pO5p3YJ2TytFpAENQbJzbrQpQ/K8NtmWVZjqTQ1/qOE88OLfmhuMMooxmiL1 pSHmAASjb8MwEDMb0GgJwJq29GpNujWWatXnk8JtE6gmDGsziVQEZYEdf4yt4cIwvxFQ UaKeb6afDys+5ob0dsukxImUz3TX5Vj0y2EtPB1DgzXanw6s8rxHxwsSfzLGRAlUSjbk ckwWl8W+gzfjShSfL/nU/onNI8ch2HaNBVGo2aPYlGGsH718+eLjns9wJNv/Lgijb4w3 EEvg== Received: by 10.112.39.105 with SMTP id o9mr8225508lbk.123.1353532758513; Wed, 21 Nov 2012 13:19:18 -0800 (PST) Received: from localhost ([2a01:7e00::f03c:91ff:fedf:4d21]) by mx.google.com with ESMTPS id et7sm706066lbb.11.2012.11.21.13.19.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 13:19:17 -0800 (PST) From: Malcolm Matalka To: Florent Monnier Cc: Caml List References: Date: Wed, 21 Nov 2012 16:19:15 -0500 In-Reply-To: (Florent Monnier's message of "Wed, 21 Nov 2012 20:53:40 +0100") Message-ID: <87lidubqng.fsf@li195-236.members.linode.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] how to wrap a command line call correctly? You can use Jane St Async or Lwt, but your application needs to work within that context for the best results (although I'm sure you can do something clever here). Otherwise you probably need to use the Unix model or similar and write your own little select loop. Or use threads perhaps. /M Florent Monnier writes: > Hi, > > I would like to know how to wrap a command line call correctly? > > I particular keep the same order of the output messages for stderr and > stdout correctly, how to handle the cases when there is something on > stdin or not, etc. > > Thanks