git: pkill(1): Add option -T to restrict to current terminal

Aaron LI aly at crater.dragonflybsd.org
Wed Mar 10 07:20:23 PST 2021


commit a2d71d01f5b798e1d53f2052232e39f6d185faf6
Author: Levente Kurusa <lkurusa at acm.org>
Date:   Tue Dec 4 23:07:52 2018 +0100

    pkill(1): Add option -T to restrict to current terminal
    
    This option is introduced for feature parity with killall(1) where it
    restricts to matching processes in the current terminal by specifying
    the -T option.  While this is achievable via pkill(1)'s -t option, for
    feature parity and convenience, this commit implements the -T option.
    
    Signed-off-by: Levente Kurusa <lkurusa at kernelstuff.org>
    
    (aly)
    I've reviewed and revised the original patch:
    * Adjust the option orders in code and in the man page.
    * Check and copy the return of ttyname(), which can be NULL and is a
      internal static buffer.
    * Make option '-t' accept a full path to the terminal device.  This
      simplifies the code by avoiding the strip of "/dev/".  Meanwhile
      update the man page accordingly.
    * Fix some minor issues in the original patch.
    
    DragonFly-bug: #3163

Summary of changes:
 usr.bin/pkill/pkill.1 | 30 ++++++++++++++++++++----------
 usr.bin/pkill/pkill.c | 23 +++++++++++++++++++----
 2 files changed, 39 insertions(+), 14 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a2d71d01f5b798e1d53f2052232e39f6d185faf6


-- 
DragonFly BSD source repository


More information about the Commits mailing list