aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dowse <freebsd-bugs@daemonbytes.net>2022-12-01 02:42:35 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2022-12-08 01:18:32 +0000
commita76fa7bb6cb721bcccc257ddbc4398d25dc8def8 (patch)
treec93c56c3800caa68268a5d20e2bd6496185a0ccb
parent209ebfa26ec4f79a8322400cffdff1c3f3248c7d (diff)
downloadsrc-a76fa7bb6cb7.tar.gz
src-a76fa7bb6cb7.zip
killall(1): allow sending signals to processes with control terminal on pts(4)
PR: 268093 (cherry picked from commit e442917ee41986c416afea1d152ad03c5daeeac4)
-rw-r--r--usr.bin/killall/killall.c3
1 files changed, 2 insertions, 1 deletions
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);