mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #18762: Print debug info on failure to create new forkserver process.
Also modify test code to hopefully avoid deadlock on failure.
This commit is contained in:
parent
6acbe2aaa3
commit
a01fb39877
2 changed files with 19 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue