At least if possible (close_fds + stdout/stderr redirection is not supported on win32 in Python <= 3.7). Closes #3378