Skip to content

Commit c97f044

Browse files
ogriseltomMoral
andauthored
Apply suggestions from code review
Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
1 parent 5d1e7dc commit c97f044

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

CHANGES.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
### 3.5.0 - in development
22

33
- Avoid raising `DeprecationWarning` related to `os.fork` when running in a
4-
natively multi-threaded process. (#435).
4+
natively multi-threaded process. (#429).
55

66
- Fix a crash when calling commands that access `stdin` via `subprocess.run` in
7-
worker processes on POSIX systems. (#435).
7+
worker processes on POSIX systems. (#429).
88

99
- Automatically call `faulthandler.enable()` when starting loky worker
1010
processes to report more informative information (post-mortem Python

loky/backend/fork_exec.py

+23-23
Original file line numberDiff line numberDiff line change
@@ -39,29 +39,29 @@ def fork_exec(cmd, keep_fds, env=None):
3939

4040
try:
4141
return _posixsubprocess.fork_exec(
42-
cmd,
43-
cmd[0:1],
44-
True,
45-
keep_fds,
46-
None,
47-
encoded_env,
48-
-1,
49-
-1,
50-
-1,
51-
-1,
52-
-1,
53-
-1,
54-
errpipe_read,
55-
errpipe_write,
56-
False,
57-
False,
58-
*pgid_to_set,
59-
None,
60-
None,
61-
None,
62-
-1,
63-
None,
64-
*allow_vfork,
42+
cmd, # args
43+
cmd[0:1], # executable_list
44+
True, # close_fds
45+
keep_fds, # pass_fds
46+
None, # cwd
47+
encoded_env, # env
48+
-1, # p2cread
49+
-1, # p2cwrite
50+
-1, # c2pread
51+
-1, # c2pwrite
52+
-1, # errread
53+
-1, # errwrite
54+
errpipe_read, # errpipe_read
55+
errpipe_write, # errpipe_write
56+
False, # restore_signal
57+
False, # call_setsid
58+
*pgid_to_set, # pgid_to_set
59+
None, # gid
60+
None, # extra_groups
61+
None, # uid
62+
-1, # child_umask
63+
None, # preexec_fn
64+
*allow_vfork, # extra flag if vfork is available
6565
)
6666
finally:
6767
os.close(errpipe_read)

0 commit comments

Comments
 (0)