bpo-36888: Add multiprocessing.parent_process() (GH-13247)

This commit is contained in:
Thomas Moreau 2019-05-20 21:37:05 +02:00 committed by Antoine Pitrou
parent 5ae1c84bcd
commit c09a9f56c0
12 changed files with 155 additions and 20 deletions

View file

@ -421,3 +421,9 @@ def spawnv_passfds(path, args, passfds):
finally:
os.close(errpipe_read)
os.close(errpipe_write)
def close_fds(*fds):
"""Close each file descriptor given as an argument"""
for fd in fds:
os.close(fd)