Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open_connection function in windows XP #8420

Closed
vicuna opened this issue Dec 17, 2003 · 1 comment
Closed

open_connection function in windows XP #8420

vicuna opened this issue Dec 17, 2003 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Dec 17, 2003

Original bug ID: 1986
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Andrei de A. Formiga
Version: 3.07
OS: Windows XP
Submission from: pw117.neoline.com.br (200.141.132.117)

This bug applies to using the open_connection function from the Unix module in
the Windows XP native version of OCaml. A session transcript that reproduces the
error is below:

#load "Unix.cma";;

let irc_addr = Unix.ADDR_INET (Unix.inet_addr_of_string "200.199.102.186",

6667);;
val irc_addr : Unix.sockaddr = Unix.ADDR_INET (, 6667)

let irc_in, irc_out = Unix.open_connection irc_addr;;

val irc_in : in_channel =
val irc_out : out_channel =

input_line irc_in;;

Exception: Sys_error "Bad file descriptor".

Unix.shutdown_connection irc_in;;

Exception: Unix.Unix_error (Unix.ENOTSOCK, "shutdown", "").

The OCaml manual states that Unix.open_connection should be available on
Windows. Further investigation of the implementation of Unix.open_connection
shows that it uses the functions Unix.in_channel_of_descr and
Unix.out_channel_of_descr. Somewhere in the documentation in the unix version it
is mentioned that both in_channel_of_descr and out_channel_of_descr don't work
on sockets under Windows 95, 98 and ME, but work under Windows NT and 2000.
Compatibility with Windows XP is not specified. It is possible that the bug is
in the implementation of in_channel_of_descr and out_channel_of_descr.

@vicuna
Copy link
Author

vicuna commented Apr 18, 2004

Comment author: administrator

Fixed 2004-04-01 by XL (see #2334)

@vicuna vicuna closed this as completed Apr 18, 2004
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant