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
43f80e6c
Commit
43f80e6c
authored
Aug 21, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Merge heads
parents
4e4088d2
a01fb398
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
Lib/multiprocessing/forkserver.py
Lib/multiprocessing/forkserver.py
+15
-0
Lib/test/_test_multiprocessing.py
Lib/test/_test_multiprocessing.py
+4
-2
No files found.
Lib/multiprocessing/forkserver.py
View file @
43f80e6c
...
...
@@ -66,6 +66,21 @@ def connect_to_new_process(fds):
try
:
reduction
.
sendfds
(
client
,
allfds
)
return
parent_r
,
parent_w
except
OSError
:
# XXX This is debugging info for Issue #18762
import
fcntl
L
=
[]
for
fd
in
allfds
:
try
:
flags
=
fcntl
.
fcntl
(
fd
,
fcntl
.
F_GETFL
)
except
OSError
as
e
:
L
.
append
((
fd
,
e
))
else
:
L
.
append
((
fd
,
flags
))
print
(
'*** connect_to_new_process: %r'
%
L
,
file
=
sys
.
stderr
)
os
.
close
(
parent_r
)
os
.
close
(
parent_w
)
raise
except
:
os
.
close
(
parent_r
)
os
.
close
(
parent_w
)
...
...
Lib/test/_test_multiprocessing.py
View file @
43f80e6c
...
...
@@ -3386,7 +3386,8 @@ class TestForkAwareThreadLock(unittest.TestCase):
if
n
>
1
:
p
=
multiprocessing
.
Process
(
target
=
cls
.
child
,
args
=
(
n
-
1
,
conn
))
p
.
start
()
p
.
join
()
conn
.
close
()
p
.
join
(
timeout
=
5
)
else
:
conn
.
send
(
len
(
util
.
_afterfork_registry
))
conn
.
close
()
...
...
@@ -3397,8 +3398,9 @@ class TestForkAwareThreadLock(unittest.TestCase):
old_size
=
len
(
util
.
_afterfork_registry
)
p
=
multiprocessing
.
Process
(
target
=
self
.
child
,
args
=
(
5
,
w
))
p
.
start
()
w
.
close
()
new_size
=
r
.
recv
()
p
.
join
()
p
.
join
(
timeout
=
5
)
self
.
assertLessEqual
(
new_size
,
old_size
)
#
...
...
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