You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 2107 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
open_out_gen [Open_wronly; Open_creat; Open_append ] 0o644 fichier
works fine,
but
open_out_gen [Open_creat; Open_append ] 0o644 fichier
doesn't.
[The difference is in the Open_wronly flag]
Both compile fine. I get a
Fatal error: uncaught exception Sys_error("Bad file number")
at run time in the second case,when the Open_wronly is absent.
More precisely, the error arises when I actually try to write to the file
Printf.fprintf stat_file "%f\t%f\t%f\n" single_tmp double_tmp
triple_tmp;;
when I had earlier on
let stat_file = open_out_gen [Open_wronly; Open_creat; Open_append ] 0o644
fichier
Both versions work under Linux 3-07
The text was updated successfully, but these errors were encountered:
open_out_gen [Open_wronly; Open_creat; Open_append ] 0o644 fichier
works fine,
but
open_out_gen [Open_creat; Open_append ] 0o644 fichier
doesn't.
[The difference is in the Open_wronly flag]
Both compile fine. I get a
Fatal error: uncaught exception Sys_error("Bad file number")
at run time in the second case,when the Open_wronly is absent.
This is consistent with the POSIX API: opening for appending doesn't
imply opening for writing. Since this behavior is somewhat useless,
OCaml 3.06 and later silently add Open_wronly when only Open_append is
given.
Original bug ID: 2107
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: André Allavena
Version: Objective Caml native-code compiler, version 3.02
OS: SunOS 5.8 Generic_108528-14 sun4u sparc SUNW,Sun-Fire-280R
Submission from: dhcp97-237.cs.cornell.edu (128.84.97.237)
open_out_gen has issues ompiling with ocamlopt:
open_out_gen [Open_wronly; Open_creat; Open_append ] 0o644 fichier
works fine,
but
open_out_gen [Open_creat; Open_append ] 0o644 fichier
doesn't.
[The difference is in the Open_wronly flag]
Both compile fine. I get a
Fatal error: uncaught exception Sys_error("Bad file number")
at run time in the second case,when the Open_wronly is absent.
More precisely, the error arises when I actually try to write to the file
Printf.fprintf stat_file "%f\t%f\t%f\n" single_tmp double_tmp
triple_tmp;;
when I had earlier on
let stat_file = open_out_gen [Open_wronly; Open_creat; Open_append ] 0o644
fichier
Both versions work under Linux 3-07
The text was updated successfully, but these errors were encountered: