We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In https://github.com/giampaolo/psutil/blob/master/psutil/_psutil_posix.c#L390 (and also in line 428), there is a call to close on sock. The issue here is that sock could be set to -1 before this call and then close would set EBADF error.
sock
-1
I am opening this issue to check if this is an actual problem. On a confirmation, i could submit a patch for this.
Thanks.
The text was updated successfully, but these errors were encountered:
Yep please do. It looks like the variable should be initialized to -1 (since socket() on error returns -1).
Sorry, something went wrong.
Do not try to close invalid socket file descriptor
739a4c8
* Fix giampaolo#1563
Fix #1563 - do not try to close invalid socket file descriptor (#1585)
2963b5f
giampaolo
Successfully merging a pull request may close this issue.
In https://github.com/giampaolo/psutil/blob/master/psutil/_psutil_posix.c#L390 (and also in line 428), there is a call to close on
sock
. The issue here is that sock could be set to-1
before this call and then close would set EBADF error.I am opening this issue to check if this is an actual problem. On a confirmation, i could submit a patch for this.
Thanks.
The text was updated successfully, but these errors were encountered: