diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/pkill/pkill.1 | 7 | ||||
-rw-r--r-- | bin/pkill/pkill.c | 7 |
2 files changed, 5 insertions, 9 deletions
diff --git a/bin/pkill/pkill.1 b/bin/pkill/pkill.1 index 725f27e..22b67bf 100644 --- a/bin/pkill/pkill.1 +++ b/bin/pkill/pkill.1 @@ -179,10 +179,9 @@ command. Restrict matches to processes associated with a terminal in the comma-separated list .Ar tty . -Terminal names may be of the form -.Pa tty Ns Ar xx -or the shortened form -.Ar xx . +The +.Pa /dev/ +prefix of the terminal names must be omitted. A single dash .Pq Ql - matches processes not associated with a terminal. diff --git a/bin/pkill/pkill.c b/bin/pkill/pkill.c index 2547744..649e7b7 100644 --- a/bin/pkill/pkill.c +++ b/bin/pkill/pkill.c @@ -607,12 +607,11 @@ makelist(struct listhead *head, enum listtype type, char *src) struct passwd *pw; struct group *gr; struct stat st; - const char *cp, *prefix; + const char *cp; char *sp, *ep, buf[MAXPATHLEN]; int empty; empty = 1; - prefix = _PATH_DEV; while ((sp = strsep(&src, ",")) != NULL) { if (*sp == '\0') @@ -673,11 +672,9 @@ makelist(struct listhead *head, enum listtype type, char *src) cp = "console"; } else { cp = sp; - if (strncmp(sp, "tty", 3) != 0) - prefix = _PATH_TTY; } - snprintf(buf, sizeof(buf), "%s%s", prefix, cp); + snprintf(buf, sizeof(buf), _PATH_DEV "%s", cp); if (stat(buf, &st) == -1) { if (errno == ENOENT) { |