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

Process on posix not closed after `waitForExit` #9616

Open
PMunch opened this Issue Nov 4, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@PMunch
Copy link
Contributor

PMunch commented Nov 4, 2018

Noticed this while working with processes. If a processes is opened without poParentStream and then called terminate and waitForExit on it will return a valid exit code from waitForExit but the process will still be around on the system. According to the doc on startProcess you need to also close a process (with a call to close). This is a bit confusing, and should either be mentioned in the docs under terminate/kill/waitForExit or simply be a part of waitForExit as it already closes some of the file handles(my suggestion would be to simply change these two lines to a call to close).

@dom96 dom96 added the Stdlib label Nov 4, 2018

@dom96

This comment has been minimized.

Copy link
Member

dom96 commented Nov 4, 2018

As I've mentioned on IRC. IMO if waitForExit returns then the process should already be gone.

This might be related to the zombie processes issue I've seen reported somewhere else.

@timotheecour timotheecour added the osproc label Jan 11, 2019

@timotheecour timotheecour changed the title Process on Linux not closed after `waitForExit` Process on posix not closed after `waitForExit` Jan 11, 2019

@timotheecour

This comment has been minimized.

Copy link
Collaborator

timotheecour commented Jan 11, 2019

also on osx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment