Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Unix.open_process "cat"
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Olivier Andrieu <andrieu@i...>
Subject: Re: [Caml-list] Unix.open_process "cat"
 Martin Jambon [Sat, 15 May 2004]:
 > Hello,
 > 
 > I would like to apply some external filters (e.g. cat, grep, sed, ...)
 > that will terminate successfully only if they reach an
 > end-of-file. For this I would like to use Unix.open_process, but I need to
 > close the output first (= the input of the command).
 > Is it legal to use close_out on the out_channel returned by
 > Unix.open_process, and later use Unix.close_process on the pair of
 > channels?

Yes, Unix.close_process will call close_out on the channel again but
this is safe.

-- 
   Olivier

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners