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
Pipes and Standard Output / Input on Windows
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-06-01 (21:06)
From: Sylvain Le Gall <sylvain@l...>
Subject: Re: Pipes and Standard Output / Input on Windows
On 29-05-2008, John Whitington <> wrote:
> Hullo.
> I'm compiling OCaml command-line software with the MSVC toolchain on  
> Windows. Users have noticed two problems:
> (a) When output (such as the --help) is done on Windows, the help  
> doesn't all show (I fixed this by flushing stdout manually - but  
> shouldn't stdout be flushed when the process exits anyway?)
> (b) Chaining invocations of the tool together using pipes on Windows  
> often fails. The second process in the chain gets an End_Of_File after  
> only a few hundred bytes of data. I've confirmed the data is all being  
> output by the first process, and the first process is exiting cleanly.  
> All the open_in and open_out calls are using the _bin variant. The  
> data being sent down the pipe is a PDF file (which contains binary  
> sections).
> Neither of these problems occur on Linux / Mac builds - is there  
> something about windows pipes I should know?

I am not sure if it is related, but i have a problem with "|" command
line pipe. It seems that this way channel are not binary one... If you
happen to transmit binary data through it, you could have problem...

I detect it, by trying "output_value stdin x".

Do you think your problem is related?

Sylvain Le Gall