caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* OCaml IDE (OCaml and stdout/stderr)
@ 2005-06-20 20:08 Nathaniel J. Gaylinn
  2005-06-21  0:34 ` [Caml-list] " Jacques Garrigue
  2005-06-21  1:13 ` Brian Hurt
  0 siblings, 2 replies; 5+ messages in thread
From: Nathaniel J. Gaylinn @ 2005-06-20 20:08 UTC (permalink / raw)
  To: caml-list


My program is having a hard time coping with how OCaml splits its output
between stdout and stderr. The order in which a line of output is received
from OCaml's stdout and a warning from its stderr seems to be completely
random and therefore my program's output is also random. I'm pretty sure
this has to do with how OCaml buffers stdout, but I'm not sure how to
change this.

To make my program more portable, I'm writing it using the QT toolkit
which has a nice abstraction of inter-process communication in a class
called QProcess. This is what I'm using to communicate with OCaml.

>From your experience, do you think the buffering is taking place on
OCaml's end or on Qt's? Some research seems to suggest that how output is
buffered from a program can be controlled from within that program (since
there is direct access to the various output streams) but not from
outside. If that's true, then the buffering problem must be inside OCaml.

Is there any nice way to force OCaml to flush its output buffers more
often? Is there any way to customize what data OCaml sends to stdout and
what it sends to stderr (this would be a nice feature to have!)? Do any
other ideas come to mind?

Thanks,

  -- Nate Gaylinn


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-06-21 14:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-20 20:08 OCaml IDE (OCaml and stdout/stderr) Nathaniel J. Gaylinn
2005-06-21  0:34 ` [Caml-list] " Jacques Garrigue
2005-06-21 13:33   ` Nathaniel J. Gaylinn
2005-06-21 14:13     ` Nathaniel J. Gaylinn
2005-06-21  1:13 ` Brian Hurt

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).