Message411229
> File descriptors 0, 1, 2 are special: stdin, stdout and stderr file descriptors. You should use stdin, stdout, and stderr parameter of subprocess.
I finally find why `fd 0` is inherited. The reason is that os.dup2() has a parameter "inheritable" which defaults to True. Not because it's special stdin.
I still think this is a bug. If some one closes fd 0, then he reopens it. it will not be inherited. |
|
Date |
User |
Action |
Args |
2022-01-22 04:01:05 | Geass-LL | set | recipients:
+ Geass-LL, vstinner, JelleZijlstra, shihai1991, sxt1001 |
2022-01-22 04:01:05 | Geass-LL | set | messageid: <1642824065.18.0.0591325640958.issue46454@roundup.psfhosted.org> |
2022-01-22 04:01:05 | Geass-LL | link | issue46454 messages |
2022-01-22 04:01:05 | Geass-LL | create | |
|