git: procctl(2): Implement PROC_REAP_KILL request to send signals

Aaron LI aly at crater.dragonflybsd.org
Tue Mar 18 18:06:45 PDT 2025


commit 46d73a5af0512b171493a842b6bc22fc0d3fe86f
Author: Aaron LI <aly at aaronly.me>
Date:   Sat Mar 8 22:33:27 2025 +0800

    procctl(2): Implement PROC_REAP_KILL request to send signals
    
    The PROC_REAP_KILL request can be used to deliver a signal to the direct
    children or all descendants of the reaper.  For the latter case, the
    signal will not be delivered to the descendants of any sub-reapers.
    
    The similar request has been implemented in FreeBSD for many years, and
    has been used in their timeout(1).  Actually, our timeout(1) is
    misbehaving if the '--foreground' flag is not specified.  And that's one
    of the main reasons to implement this request.
    
    Mentored-by: dillon
    Reviewed-by: dillon

Summary of changes:
 lib/libc/sys/procctl.2 |  41 +++++++++++-
 sys/kern/kern_fork.c   | 166 +++++++++++++++++++++++++++++++++++++++++++++++++
 sys/sys/param.h        |   3 +-
 sys/sys/proc.h         |   3 +-
 sys/sys/procctl.h      |  21 +++++--
 5 files changed, 226 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/46d73a5af0512b171493a842b6bc22fc0d3fe86f


-- 
DragonFly BSD source repository


More information about the Commits mailing list