caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Adrien Nader <adrien@notk.org>
To: Dmitriy Musatkin <dmleaper@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Strange File IO bug
Date: Wed, 27 Jul 2016 18:56:35 +0200	[thread overview]
Message-ID: <20160727165635.GA19492@notk.org> (raw)
In-Reply-To: <CA+g5CH0iOgJPDMA6nEL2q3Ob_8N0G8zQHThQaAVLFJQOmomhVw@mail.gmail.com>

Hi,

On Tue, Jul 26, 2016, Dmitriy Musatkin wrote:
> Hi all,
> 
> I maintain a small OCaml program that generates some data, writes it to a
> temporary file and creates another process, which then reads that temporary
> file. Recently, I've received a few reports from users that the program
> generates an empty file when it should not. All of the affected users run
> either 64bit Win7 or Win10. I have access to one of those users' machines,
> and I can reproduce the issue consistently, however I'm not able to
> reproduce the issue on any other machine.
> 
> The file io part looks something like following:
> let oc = open_out_bin file in
> output_string oc s;
> close_out oc
> 

Most probably, "flush oc" before "close oc": out_channel is buffered. :) 

-- 
Adrien Nader

  reply	other threads:[~2016-07-27 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26 19:33 Dmitriy Musatkin
2016-07-27 16:56 ` Adrien Nader [this message]
2016-07-27 18:24   ` Gerd Stolpmann

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=20160727165635.GA19492@notk.org \
    --to=adrien@notk.org \
    --cc=caml-list@inria.fr \
    --cc=dmleaper@gmail.com \
    /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).