Skip to content

Process should support child outliving the parent #37620

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
mikedilger opened this issue Nov 6, 2016 · 2 comments
Closed

Process should support child outliving the parent #37620

mikedilger opened this issue Nov 6, 2016 · 2 comments

Comments

@mikedilger
Copy link
Contributor

#14467 solved this in 2014, but subsequent move to std::process lost that functionality. Is this recoverable?

Under Unix I can use CommandExt::exec(), but I'm aiming for code that will work under Windows as well.

@retep998
Copy link
Member

retep998 commented Nov 6, 2016

According to the documentation

Take note that there is no implementation of Drop for child processes, so if you do not ensure the Child has exited then it will continue to run, even after the Child handle to the child process has gone out of scope.
Calling wait (or other functions that wrap around it) will make the parent process wait until the child has actually exited before continuing.

Is this not sufficient for your purposes?

@mikedilger
Copy link
Contributor Author

Oops, that is the bit of documentation I seem to have glossed over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants