Browse thread
commands.getoutput () in ocaml?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Dr._Axel_Poigné <axel.poigne@i...> |
| Subject: | Re: [Caml-list] commands.getoutput () in ocaml? |
>
>
>> I am looking for a quick way to do the equivalent of
>> s = commands.getoutput ("ls " + name + "*")
>> in Ocaml.
>>
>
> I have translated many of the examples from the Perl Cookbook for
> the Process Management and Communication chapter of the OCaml
> PLEAC. This is one of the topics covered.
>
> http://pleac.sourceforge.net/pleac_ocaml/processmanagementetc.html
>
> Dave
>
There is a problem with the read_process_lines function though: if
the output buffer gets too long the process does not return to close
the input channel. Consequence is that the spawning process is blocked.
That's a problem I do not know how to solve.
Axel