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: 6775 Reporter: @sliquister Assigned to:@gasche Status: closed (set by @xavierleroy on 2016-12-07T10:47:13Z) Resolution: fixed Priority: normal Severity: minor Target version: 4.02.2+dev / +rc1 Fixed in version: 4.02.2+dev / +rc1 Category: standard library Tags: patch Monitored by:@hcarty
Bug description
$ for _i = 0 to 10000; do try ignore (Digest.file "." : string) with e -> Printf.printf "%s\n%!" (Printexc.to_string e); done;;
...
(Sys_error ".: Too many open files")
(Sys_error ".: Too many open files")
(Sys_error ".: Too many open files")
Digest.file should catch exceptions and close the channel, for instance:
let file filename =
let ic = open_in_bin filename in
let d =
try channel ic (-1)
with e -> close_in ic; raise e
in
close_in ic;
d
The text was updated successfully, but these errors were encountered:
Original bug ID: 6775
Reporter: @sliquister
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2016-12-07T10:47:13Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.02.2+dev / +rc1
Category: standard library
Tags: patch
Monitored by: @hcarty
Bug description
$ for _i = 0 to 10000; do try ignore (Digest.file "." : string) with e -> Printf.printf "%s\n%!" (Printexc.to_string e); done;;
...
(Sys_error ".: Too many open files")
(Sys_error ".: Too many open files")
(Sys_error ".: Too many open files")
Digest.file should catch exceptions and close the channel, for instance:
let file filename =
let ic = open_in_bin filename in
let d =
try channel ic (-1)
with e -> close_in ic; raise e
in
close_in ic;
d
The text was updated successfully, but these errors were encountered: