Skip to content
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

CA-327382: reap child processes #456

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

MarkSymsCtx
Copy link
Contributor

This caused XSI-474 and other reported customer issues.

Signed-off-by: Mark Syms mark.syms@citrix.com

This caused XSI-474 and other reported customer issues.

Signed-off-by: Mark Syms <mark.syms@citrix.com>
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 35.281% when pulling b4f62fc on MarkSymsCtx:CA-327382 into 769ca67 on xapi-project:master.

@xapi-project xapi-project deleted a comment from MarkSymsCtx Sep 23, 2019
os.killpg(pid, signal.SIGKILL)
raise AbortException("Aborting due to signal")
if timeOut and time.time() - startTime > timeOut:
os.killpg(pid, signal.SIGKILL)
Copy link
Contributor

@BenSimsCitrix BenSimsCitrix Sep 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we could tidyup by having a resultFlag.clearall() in the finally?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we could tidyup by having a resultFlag.clearall() in the finally.

Do we still care at that point? If we entered the finally: as the result of an exception, the exception will be re-thrown when the finally completes.

wait_pid, rc = os.waitpid(pid, os.WNOHANG)
if wait_pid == 0:
time.sleep(2)
count += 1
Copy link
Contributor

@BenSimsCitrix BenSimsCitrix Sep 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs say that an OSError can be raised by os.waitpid, do we want to catch it or bomb out?

@MarkSymsCtx MarkSymsCtx merged commit 1d101d9 into xapi-project:master Sep 23, 2019
@MarkSymsCtx MarkSymsCtx deleted the CA-327382 branch September 23, 2019 09:33
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

Successfully merging this pull request may close these issues.

None yet

4 participants