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

Don't assume perf is still alive after sending it SIGTERM #293

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

Xyene
Copy link
Member

@Xyene Xyene commented Feb 17, 2024

We caught this in practice with certain builds of perf.

This code seems pretty fishy, and I'd like to look into it further later: it's not obvious to me why waitpid would raise if the PID no longer exists. I would have expected perf to still be an unreaped child at this point.

But, we do have ~identical logic in ferrying ^C to perf in src/trace.ml too...

We caught this in practice with certain builds of `perf`.

This code seems pretty fishy, and I'd like to look into it further
later: it's not obvious to me why `waitpid` would raise if the PID no
longer exists. I would have expected `perf` to still be an unreaped
child at this point.

But, we do have ~identical logic in ferrying ^C to `perf` in
`src/trace.ml` too...

Signed-off-by: Tudor Brindus <tbrindus@janestreet.com>
@Xyene Xyene requested a review from cgaebel February 17, 2024 22:15
@Xyene Xyene merged commit efe513c into janestreet:master Feb 19, 2024
2 checks passed
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

2 participants