killall(1): allow sending signals to processes with control terminal on pts(4)

PR:	268093
Reviewed by:	kib
MFC after:	1 week
This commit is contained in:
Daniel Dowse 2022-12-01 04:42:35 +02:00 committed by Konstantin Belousov
parent d1f3abc892
commit e442917ee4

View File

@ -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);