caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: John Whitington <john@coherentgraphics.co.uk>
To: Sylvain Le Gall <sylvain@le-gall.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Pipes and Standard Output / Input on Windows
Date: Mon, 2 Jun 2008 08:36:41 +0100	[thread overview]
Message-ID: <37E71E9C-58BA-4530-B6A0-5C8DACE9A714@coherentgraphics.co.uk> (raw)
In-Reply-To: <slrng463q2.6bg.sylvain@gallu.homelinux.org>


On 1 Jun 2008, at 22:06, Sylvain Le Gall wrote:

> On 29-05-2008, John Whitington <john@coherentgraphics.co.uk> wrote:
>>
>> 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?)

Still no clue on this one, I'm afraid.

>> (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?

It seems this is correct. See the section "Problems with Pipes" here:

http://dev.mysql.com/doc/refman/5.0/en/windows-vs-unix.html

So I'll need to encode the data somehow, or introduce my own chaining
separator on the command line.

-- 
John Whitington
Coherent Graphics Ltd
http://www.coherentpdf.com/




  reply	other threads:[~2008-06-02  7:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29 13:39 John Whitington
2008-05-29 14:36 ` Sylvain Le Gall
2008-05-29 22:11   ` [Caml-list] " David Allsopp
2008-05-30 15:12     ` Sylvain Le Gall
2008-05-29 22:16 ` [Caml-list] " David Allsopp
2008-06-01 21:06 ` Sylvain Le Gall
2008-06-02  7:36   ` John Whitington [this message]
     [not found]     ` <4CA29E0FF2BC43FC9A7585F496BE65EF@countertenor>
2008-06-02 12:00       ` [Caml-list] " 'Sylvain Le Gall'
2008-06-02 12:46     ` David Allsopp
2008-06-02 17:57       ` John Whitington

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37E71E9C-58BA-4530-B6A0-5C8DACE9A714@coherentgraphics.co.uk \
    --to=john@coherentgraphics.co.uk \
    --cc=caml-list@inria.fr \
    --cc=sylvain@le-gall.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).