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: 4973 Reporter: Christoph Bauer Assigned to: gildor Status: closed (set by @xavierleroy on 2012-03-24T14:01:02Z) Resolution: fixed Priority: normal Severity: tweak Version: 3.11.0 Fixed in version: 3.12.0+dev Category: ~DO NOT USE (was: OCaml general)
Bug description
Only Windows is affected.
I open a process and call select on stdin/stdout pipes. If the
process terminates on Unix, I get an Unix_error exception (Broken
pipe). Under windows I get 'Failure "Unknown handle"`. This comes
from select.c. It would be nice to have also a Unix_error, because
it reduces the number of portability problems.
The text was updated successfully, but these errors were encountered:
I think you mean the contrary, when testing I get:
a Sys_error("Bad file descriptor") on Linux
a Broken pipe on Windows
let dummy_exec =
Compile.compile_one_liner "dummy" [] ""
in
let (chn_in, chn_out) as proc =
open_process dummy_exec
in
let _s : process_status =
close_process proc
in
select
[descr_of_in_channel chn_in]
[descr_of_out_channel chn_out]
[]
1.0
Check a little further, Sys_error("Bad file descriptor") | EPIPE is raised by descr_of_in_channel/descr_of_out_channel.
If I rework the program in this way:
let dummy_exec =
Compile.compile_one_liner "dummy" [] ""
in
let (chn_in, chn_out) as proc =
open_process dummy_exec
in
let fd_in =
descr_of_in_channel chn_in
in
let fd_out =
descr_of_out_channel chn_out
in
let _s : process_status =
close_process proc
in
select
[fd_in]
[fd_out]
[]
1.0
Original bug ID: 4973
Reporter: Christoph Bauer
Assigned to: gildor
Status: closed (set by @xavierleroy on 2012-03-24T14:01:02Z)
Resolution: fixed
Priority: normal
Severity: tweak
Version: 3.11.0
Fixed in version: 3.12.0+dev
Category: ~DO NOT USE (was: OCaml general)
Bug description
Only Windows is affected.
I open a process and call select on stdin/stdout pipes. If the
process terminates on Unix, I get an Unix_error exception (Broken
pipe). Under windows I get 'Failure "Unknown handle"`. This comes
from select.c. It would be nice to have also a Unix_error, because
it reduces the number of portability problems.
The text was updated successfully, but these errors were encountered: