Brett Randall added the comment:
docker run -i --rm python:3.9 <<-EOF
import os
print(os.get_inheritable(0))
fd_null_before_close = os.open("/dev/null", os.O_RDWR)
os.close(0)
fd_null = os.open("/dev/null", os.O_RDWR)
print(fd_null_before_close)
print(fd_null)
Brett Randall added the comment:
For the possible benefit of future readers of this issue, the sequence and
behaviour here which may cause confusion:
- say stdin is closed, perhaps along with stdout and stderr via a call to
os.closerange(0, 3) or otherwise
- os.open() is called and creates
Change by Brett Randall :
--
nosy: +javabrett
___
Python tracker
<https://bugs.python.org/issue46454>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Randall :
--
nosy: +javabrett
___
Python tracker
<https://bugs.python.org/issue27805>
___
___
Python-bugs-list mailing list
Unsubscribe: