Skip to content

Added tryWait() into Process and ProcessHandle. Handle kill()-ed UNIX process exit codes.#2689

Closed
agalanin wants to merge 3 commits intopocoproject:poco-1.9.0from
agalanin:poco-1.9.0
Closed

Added tryWait() into Process and ProcessHandle. Handle kill()-ed UNIX process exit codes.#2689
agalanin wants to merge 3 commits intopocoproject:poco-1.9.0from
agalanin:poco-1.9.0

Conversation

@agalanin
Copy link
Copy Markdown
Contributor

@agalanin agalanin commented May 6, 2019

Unfortunately, kill(pid, 0) treats zombie processes as running. So it is impossible to implement periodical watchdog for a child processes.

I propose new method tryWait() in Poco::Process and Poco::ProcessHandle. It checks process status and returns immediately with value indicating running process or it's exit code.

Also I have added distinction between exited and killed process return codes in wait and tryWait.

@obiltschnig obiltschnig self-assigned this May 6, 2019
@obiltschnig obiltschnig added this to the Release 1.9.1 milestone May 6, 2019
obiltschnig added a commit that referenced this pull request Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants