Avoid taskstats_exit and sched_process_exit#232
Merged
nicholasberlin merged 1 commit intomainfrom Sep 24, 2025
Merged
Conversation
8d70ca6 to
fb93918
Compare
stanek-michal
approved these changes
Sep 23, 2025
fb93918 to
45fec0a
Compare
taskstats_exit can be compiled out based on kernel configuration. Instead use disassociate_ctty(1) (CONFIG_TTY, hopefully less likely to be compiled out) as an indication that group_dead has been set. sched_process_exit is called before exit_files, so it's possible that a socket disconnect event could be emitted after a process termination. And, disassociate_ctty is called after. Remove group_dead tracking.
45fec0a to
c71a5dc
Compare
Contributor
Author
|
Updated to only use |
haesbaert
approved these changes
Sep 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
taskstats_exit can be compiled out based on kernel configuration. Instead use disassociate_ctty(1) as an indication that group_dead has been set. sched_process_exit is called before exit_files, so it's possible that a socket disconnect event could be emitted after a process termination. instead use exit_task_namespaces to emit the exit event. we had little choice in the matter since sched_process_exit is executed before disassociate_ctty, but sched_process_exit was still the incorrect spot to emit an exit event and worth noting.