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: 315 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
temp_file prefix suffix returns the name of a non-existent temporary file in
the temporary directory. [blabla]
It should say:
temp_file prefix suffix creates a non-existent 0-length temporary file in
the temporary directory and returns its name. [blabla]
Otherwise, you are tempted to believe that in order to prevent the race
condition,
you should typically do :
let open_temp () =
try open_out_gen [Open_excl] Oo666 (Filename.temp_file "foo" ".bar") with
| Sys_error _ -> open_temp ()
This would funnily not necessarily full the temporary directory but would
say "Filename.temp_file: temp dir nonexistent or full"...
BTW, why is there this undocumented hard limit of 1000 on the number of
temporary
file with a given prefix and suffix ? I think at least the message could be
improved.
Judicaël.
The text was updated successfully, but these errors were encountered:
temp_file prefix suffix returns the name of a non-existent temporary file in
the temporary directory. [blabla]
It should say:
temp_file prefix suffix creates a non-existent 0-length temporary file in
the temporary directory and returns its name. [blabla]
Fixed. Thanks for the suggestion.
This would funnily not necessarily full the temporary directory but would
say "Filename.temp_file: temp dir nonexistent or full"...
BTW, why is there this undocumented hard limit of 1000 on the number
of temporary file with a given prefix and suffix ? I think at least
the message could be improved.
The test wasn't there initially, but without it we get an infinite
loop if the temporary directory doesn't exist. This sometimes happens
on Windows machines where \temp is missing. (It actually happened to
Henri Laulhere when compiling Coq in native-code on his Windows
machine; ocamlopt just entered an endless loop trying to find a
suitable temp file for its asm output...)
Original bug ID: 315
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Judicaël Courant
Version: ocaml-3.01
OS: Linux
Submission from: ext2.lri.fr (129.175.15.5)
The doc of Filename.temp_file says
temp_file prefix suffix returns the name of a non-existent temporary file in
the temporary directory. [blabla]
It should say:
temp_file prefix suffix creates a non-existent 0-length temporary file in
the temporary directory and returns its name. [blabla]
Otherwise, you are tempted to believe that in order to prevent the race
condition,
you should typically do :
let open_temp () =
try open_out_gen [Open_excl] Oo666 (Filename.temp_file "foo" ".bar") with
| Sys_error _ -> open_temp ()
This would funnily not necessarily full the temporary directory but would
say "Filename.temp_file: temp dir nonexistent or full"...
BTW, why is there this undocumented hard limit of 1000 on the number of
temporary
file with a given prefix and suffix ? I think at least the message could be
improved.
Judicaël.
The text was updated successfully, but these errors were encountered: