-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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::isRunning returns true for defunct tagged process #1097
Comments
I've realized that if I'm not sure what should be the expected behavior. I'm running through all this with Poco because I'm attempting to construct a timed |
So my first attempt was to periodically check |
That's the reality of this world, you need to call Ideally we should probably setup a dedicated thread which sits on self-pipe read, calls |
Note that dedicated thread will also allow for nice |
I just came here for this very same question and don't share @mikedld's view on the reality of this world. A zombie process already has terminated, it consumes almost no memory and will never be on the run queue again. In my understanding such a process is not running anymore. The kernel merely holds a small data structure so somebody can get the exit status and other information. If the behavior of Regarding |
I'd like to notice that, for example, |
Committed that small patch I was talking about before. Let's see where it leads us to. |
@mikedld Coudn't check it yet but thanks. |
It appears that this fix was merged to |
not intentional, please send pull if you want it in the next release |
Shouldn't the issue be reopened until there's a plan of merging to releases? |
Never fixed. This is truly the bad ending. RIP Josh's PR. To others looking for a workable solution - you could wait for a |
@Icedude907, would you prepare a PR that would solve the problem and help others that are affected? |
Hey @matejk, thanks for reaching out. I have found a solution I am happy with so I don't feel a pressing need to try fixing the issue upstream. |
@Icedude907 at the time, Josh was asked for some further changes, but he had no time. Now, 6 years later, you complain about it but also can't be bothered to contribute. FWIW, here is the change adapted to the most recent release; maybe someone will find time to put it in order. I only checked on mac and tests do not pass. |
After starting a process with:
The following snippet never exits the loop:
I've checked with
ps -A | grep foo
that the given foo process has been tagged asdefunct
by the system just afterProcess::launch
, meaning that it has been started and exited successfully, but it still stays around as defunct until the parent application terminates:I'm running on x64 Linux with Poco 1.6.1.
The text was updated successfully, but these errors were encountered: