From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Determination of the identification for the last started background process
Date: Sat, 9 Jan 2021 17:44:41 +0100 [thread overview]
Message-ID: <CAH=h3gH6WfM_U0bqWW=g-5LAMFGTt48QtoNjOE_NNCU2raFWWA@mail.gmail.com> (raw)
In-Reply-To: <CAPFanBFzqeyu0F74_T_5Zb4yDRHh9OYg8k3CAhDSrXADantiFw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
On Sat, Jan 9, 2021 at 5:34 PM Gabriel Scherer <gabriel.scherer@gmail.com>
wrote:
> My understanding is that if "prog" is the name of the program to run, then
>
> Unix.system (Filename.quote_command prog args)
>
> is equivalent to
>
> Unix.create_process prog args ~stdin:Unix.stdin ~stdout:Unix.stdout
> ~stderr:Unix.stderr
>
Not quite: args should be Array.of_list (prog :: args). Argument number 0
is, by Unix convention, the name of the program.
The original poster may be looking for the Unix.open_process family of
functions.
- Xavier Leroy
> or (shorter)
>
> Unix.(create_process prog args ~stdin ~stdour ~stderr)
>
> On Sat, Jan 9, 2021 at 5:08 PM Markus Elfring <Markus.Elfring@web.de>
> wrote:
>
>> > You may be looking for the
>> >
>> > Unix.create_process
>>
>> This function needs more input parameters than “Unix.system”.
>>
>> https://ocaml.org/releases/4.11/htmlman/libref/UnixLabels.html#VALcreate_process
>>
>> Now I am curious which datum should be passed for the argument “stdin”
>> if a program should be executed as a child process without extra standard
>> input?
>>
>> Regards,
>> Markus
>>
>
[-- Attachment #2: Type: text/html, Size: 2414 bytes --]
next prev parent reply other threads:[~2021-01-09 16:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 14:05 Markus Elfring
2021-01-06 14:41 ` Gabriel Scherer
2021-01-09 16:08 ` Markus Elfring
2021-01-09 16:33 ` Gabriel Scherer
2021-01-09 16:43 ` [Caml-list] Creation of a child process without extra standard input? Markus Elfring
2021-01-09 16:44 ` Xavier Leroy [this message]
2021-01-09 16:52 ` [Caml-list] Determination of the identification for the last started background process Markus Elfring
2021-01-09 17:29 ` Oliver Bandel
2021-01-09 18:00 ` Markus Elfring
2021-01-09 17:26 ` Oliver Bandel
2021-01-09 17:52 ` Markus Elfring
2021-01-10 9:00 ` [Caml-list] Specification of an input file for a child process Markus Elfring
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='CAH=h3gH6WfM_U0bqWW=g-5LAMFGTt48QtoNjOE_NNCU2raFWWA@mail.gmail.com' \
--to=xavier.leroy@inria.fr \
--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