English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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-05-29 (13:39)
From: John Whitington <john@c...>
Subject: Pipes and Standard Output / Input on Windows

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  

Neither of these problems occur on Linux / Mac builds - is there  
something about windows pipes I should know?

John Whitington
Coherent Graphics Ltd