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

Keepfd arg is backwards #1

Open
Posnet opened this issue Jan 26, 2018 · 1 comment
Open

Keepfd arg is backwards #1

Posnet opened this issue Jan 26, 2018 · 1 comment

Comments

@Posnet
Copy link

Posnet commented Jan 26, 2018

The keepfd arg is backwards for the python3 implementaion:

if keep_fd:
            return socket.fromfd(fd, family, typ, proto)
else:
            return socket.socket(family, typ, proto, fileno=fd)

see:
socket

... Unlike socket.fromfd(), fileno will return the same socket and not a duplicate ...

fromfd

Duplicate the file descriptor fd (an integer as returned by a file object’s fileno() method) and build a socket object ...

@apollo13
Copy link

@tiran you wanted to get nagged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants