Skip to content

daemon: launch cmd is broken when running main() from elsewhere #4165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
efiop opened this issue Jul 3, 2020 · 0 comments · Fixed by #4262
Closed

daemon: launch cmd is broken when running main() from elsewhere #4165

efiop opened this issue Jul 3, 2020 · 0 comments · Fixed by #4262
Labels
bug Did we break something? p2-medium Medium priority, should be done, but less important

Comments

@efiop
Copy link
Contributor

efiop commented Jul 3, 2020

iterative/dvc-bench#149

@ghost ghost added the triage Needs to be triaged label Jul 3, 2020
@efiop efiop added bug Did we break something? p2-medium Medium priority, should be done, but less important labels Jul 3, 2020
@ghost ghost removed the triage Needs to be triaged label Jul 3, 2020
@efiop efiop assigned efiop and unassigned efiop Jul 3, 2020
efiop added a commit to efiop/dvc that referenced this issue Jul 23, 2020
We used `Popen` just to provide a general way of launching our daemons
on both Windows and *nix, but it is causing us issues when dvc is
launched from some exotic places (like nix package) or through `main()`
helper from a script that is not dvc.

This patch makes us just use `main()` directly in our double-forked
process.

Windows implementation has to use the `Popen` mechanism, because this is
the only way to daemonize a process on Windows. This means that dvc on
Windows is still susceptible to this problem, but there is nothing we
can do about it right now :(

Fixes iterative#4206
Fixes iterative#4165
efiop added a commit that referenced this issue Jul 23, 2020
We used `Popen` just to provide a general way of launching our daemons
on both Windows and *nix, but it is causing us issues when dvc is
launched from some exotic places (like nix package) or through `main()`
helper from a script that is not dvc.

This patch makes us just use `main()` directly in our double-forked
process.

Windows implementation has to use the `Popen` mechanism, because this is
the only way to daemonize a process on Windows. This means that dvc on
Windows is still susceptible to this problem, but there is nothing we
can do about it right now :(

Fixes #4206
Fixes #4165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Did we break something? p2-medium Medium priority, should be done, but less important
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant