diff options
author | Paul Stewart <pstew@google.com> | 2015-11-18 11:32:22 -0800 |
---|---|---|
committer | Paul Stewart <pstew@google.com> | 2015-11-18 14:39:47 -0800 |
commit | b6a5c6113b0b7ae947c5a1729d4b9d08287a83e2 (patch) | |
tree | b6be9e99eddf13e562fc619cf89892ae9a3dbc48 /brillo/process_reaper.h | |
parent | 94afaa4bf4e5266fe057664238e241d4b638d5ff (diff) | |
download | platform_external_libbrillo-b6a5c6113b0b7ae947c5a1729d4b9d08287a83e2.tar.gz platform_external_libbrillo-b6a5c6113b0b7ae947c5a1729d4b9d08287a83e2.tar.bz2 platform_external_libbrillo-b6a5c6113b0b7ae947c5a1729d4b9d08287a83e2.zip |
Add a method to ProcessReaper to forget a tracked pid
Allow callers to remove a tracked pid if tracking is
no longer desired (e.g., if the caller has reaped the
process themselves.)
BUG=chromium:535910
Change-Id: Ie056c54a66c5aed539d2a77a41135f9b2da66582
Diffstat (limited to 'brillo/process_reaper.h')
-rw-r--r-- | brillo/process_reaper.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/brillo/process_reaper.h b/brillo/process_reaper.h index d88f572..937c88c 100644 --- a/brillo/process_reaper.h +++ b/brillo/process_reaper.h @@ -44,6 +44,13 @@ class BRILLO_EXPORT ProcessReaper final { pid_t pid, const ChildCallback& callback); + // Stop watching child process |pid|. This is useful in situations + // where the child process may have been reaped outside of the signal + // handler, or the caller is no longer interested in being notified about + // this child process anymore. Returns true if a child was removed from + // the watchlist. + bool ForgetChild(pid_t pid); + private: // SIGCHLD handler for the AsynchronousSignalHandler. Always returns false // (meaning that the signal handler should not be unregistered). |