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

Waiting for non-child exit on Linux #154

Open
RJVB opened this issue Aug 27, 2023 · 0 comments
Open

Waiting for non-child exit on Linux #154

RJVB opened this issue Aug 27, 2023 · 0 comments

Comments

@RJVB
Copy link

RJVB commented Aug 27, 2023

children of the application process can be monitored for exit.

I've been looking into this, and I think there's a work-around mentioned here: https://stackoverflow.com/a/22893464/1460868 : using ptrace(2). There are limits to that too (only 1 other process can wait) but on my ageing Ubuntu 14.04 system I didn't have to tweak a file under /proc/sys/kernel in order to make it possible to do strace -qqe '' -p PID>.

You'd probably want to limit this only to non-child process (by querying /proc/PID/tasks/PID/children?) and get the relevant, stripped-down code from https://github.com/strace/strace .

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

No branches or pull requests

1 participant