chroot_directory conflicts with stdin/out/err options
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-daemon (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python-daemon
When combining chrooting with redirection of stdin/out/err to a file, an exception occurs.
The cause is that in DaemonContext.open, "change_
Among the two possible solutions I see is to call chroot after redirect_stream (but note, the test verifies the sequence, so this may not be a good solution), or to have an instance variable reference os.devnull before chrooting and make sure the file (/dev/null) is added to exclude_fds (called at line 336) such that it will not be closed in close_all_