redirect fds rather than closing#10028
Conversation
Codecov ReportAttention:
... and 67 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
dberenbaum
left a comment
There was a problem hiding this comment.
It's working as expected for me
| _suppress_resource_warning(popen) | ||
|
|
||
|
|
||
| def redirect_streams_to_null(): |
There was a problem hiding this comment.
| def redirect_streams_to_null(): | |
| def _redirect_streams_to_null(): |
There was a problem hiding this comment.
Let's at least include a link to your explanation comment on github.
|
@skshetry From your research in #10026 (comment) , are there indications that fork might be a problem on linux as well? |
|
I haven't found any issues with I am not sure if using |
|
@skshetry Sounds good. Do you want to fix windows test so we could merge this for now or would you like to wait for that PR? |
|
I will wait for the next PR, i need to add tests. Will keep this open as an alternative for now. |
|
Unfortunately, we'll have to stick with this PR. There is no way to detach a subprocess (without double-forking). |
On inherited processes, the sys.{stdin/stderr/stdout} object were being set to
Nonedue to result of closing the standard stream fds (seecloserangebelow). We redirect 0, 1 and 2 to dev null now.Also rolled back to use
subprocessfor macOS as fork is not safe there.I have also added a
dvc daemon testcommand for use in a functional test.