Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
992ca527
Commit
992ca527
authored
Feb 04, 2012
by
Charles-François Natali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #8184: Fix a potential file descriptor leak when a
multiprocessing.Connection socket can't be bound.
parent
90b13583
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
Lib/multiprocessing/connection.py
Lib/multiprocessing/connection.py
+8
-4
No files found.
Lib/multiprocessing/connection.py
View file @
992ca527
...
...
@@ -249,10 +249,14 @@ class SocketListener(object):
'''
def
__init__
(
self
,
address
,
family
,
backlog
=
1
):
self
.
_socket
=
socket
.
socket
(
getattr
(
socket
,
family
))
self
.
_socket
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_REUSEADDR
,
1
)
self
.
_socket
.
bind
(
address
)
self
.
_socket
.
listen
(
backlog
)
self
.
_address
=
self
.
_socket
.
getsockname
()
try
:
self
.
_socket
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_REUSEADDR
,
1
)
self
.
_socket
.
bind
(
address
)
self
.
_socket
.
listen
(
backlog
)
self
.
_address
=
self
.
_socket
.
getsockname
()
except
socket
.
error
:
self
.
_socket
.
close
()
raise
self
.
_family
=
family
self
.
_last_accepted
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment