Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Dec 2022 03:42:08 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e442917ee419 - main - killall(1): allow sending signals to processes with control terminal on pts(4)
Message-ID:  <202212010342.2B13g8Df068890@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=e442917ee41986c416afea1d152ad03c5daeeac4

commit e442917ee41986c416afea1d152ad03c5daeeac4
Author:     Daniel Dowse <freebsd-bugs@daemonbytes.net>
AuthorDate: 2022-12-01 02:42:35 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-12-01 02:42:35 +0000

    killall(1): allow sending signals to processes with control terminal on pts(4)
    
    PR:     268093
    Reviewed by:    kib
    MFC after:      1 week
---
 usr.bin/killall/killall.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c
index aca0830c158b..494a527d190b 100644
--- a/usr.bin/killall/killall.c
+++ b/usr.bin/killall/killall.c
@@ -255,7 +255,8 @@ main(int ac, char **av)
 	if (tty) {
 		if (strncmp(tty, "/dev/", 5) == 0)
 			snprintf(buf, sizeof(buf), "%s", tty);
-		else if (strncmp(tty, "tty", 3) == 0)
+		else if (strncmp(tty, "tty", 3) == 0 ||
+		    strncmp(tty, "pts/", 4) == 0)
 			snprintf(buf, sizeof(buf), "/dev/%s", tty);
 		else
 			snprintf(buf, sizeof(buf), "/dev/tty%s", tty);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212010342.2B13g8Df068890>