Skip to content

"error -1 when closing file descriptor" for TcpListener on win64 #19333

@nstoddard

Description

@nstoddard

On Windows 7, 64-bit, the following code prints "error -1 when closing file descriptor " when run:

use std::io::net::tcp::TcpListener;

fn main() {
  let _ = TcpListener::bind(("0.0.0.0", 0));
}

I'm assuming the small integer is the file descriptor number. I'm not sure if the values actually mean much, but I'm seeing the values 188 (for this program) and 208 (for the program I first saw the error in).

This error occurs with version "rustc 0.13.0-nightly (3959013 2014-11-24 00:46:30 +0000)". It didn't occur with version "rustc 0.13.0-nightly (0a5e7f3 2014-11-03 23:16:55 +0000)".

I haven't tested on any other OSes; just Windows 7 64-bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions