Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006973OCamlstandard librarypublic2015-08-29 00:152017-02-20 11:46
Reporteroliver 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
Platform./.OS./.OS Version./.
Product Version4.02.3 
Target VersionFixed in Version 
Summary0006973: Provide functionality to set Pervasive's stderr to unbuffered bahaviour (Unix-like behaviour)
Descriptionstderr on Unix is unbuffered by default.

In OCaml, all the Channels from Pervasives are buffered by default,
and flush-function must be used.

This issue is counter-intuitive (error must be reported ASAP) and un-Unix-ish, even though OCaml is typically used in Unix environment.

It would be fine if there would be a possibility to set
stderr-behaviour from Pervasives to behave like Unix-default behaviour
of stderr.

Something like an aequivalent of setbuf(3) / setvbuf(3) for OCaml's pervasives would be nice.
(Either at least for Pervasive's stderr, or in general for streams, like setbuf/setvbuf, which are for all streams.)


See W.R. Stevens, APUE, 14th printing 1997, Chapter 5.4.:

"The standard error stream for example, is normally unbuffered." (page 123)
TagsNo tags attached.
Attached Files

- Relationships
has duplicate 0007177resolvedfrisch stderr is buffered when using some prerr functions 

-  Notes
(0014416)
Str (reporter)
2015-09-01 11:33

(as has been said on caml-list)

the _endline and _newline print functions are doing a flush on the output channel

see stdlib/pervasives.ml:419

- Issue History
Date Modified Username Field Change
2015-08-29 00:15 oliver New Issue
2015-09-01 11:33 Str Note Added: 0014416
2015-11-27 16:02 doligez Status new => acknowledged
2017-02-17 15:58 frisch Relationship added related to 0007177
2017-02-20 11:46 frisch Relationship replaced has duplicate 0007177
2017-02-23 16:43 doligez Category OCaml standard library => standard library


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker