Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2004-05-15 (17:25)
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.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: