With python >= 3.4 all newly opened files are not inheritable by default.
https://docs.python.org/3/library/os.html#fd-inheritance
While dup2 would set the new file descriptor to be inheritable, it
does that only if the file descriptors differ. If the file descriptors
that should be redirected don't differ, the inheritable flag needs to be
set manually.
If the inheritable flag is not set on the standard streams, child process are
started without any standard streams.
With python >= 3.4 all newly opened files are not inheritable by default.
https://docs.python.org/3/library/os.html#fd-inheritance
While
dup2would set the new file descriptor to be inheritable, itdoes that only if the file descriptors differ. If the file descriptors
that should be redirected don't differ, the inheritable flag needs to be
set manually.
If the inheritable flag is not set on the standard streams, child process are
started without any standard streams.