svn commit: r201484 - head/bin/pkill
David E. O'Brien
obrien at FreeBSD.org
Mon Jan 4 10:37:08 UTC 2010
Author: obrien
Date: Mon Jan 4 10:37:07 2010
New Revision: 201484
URL: http://svn.freebsd.org/changeset/base/201484
Log:
Fix the "-t" functionality. Per the regression tests (pgrep-t.t & pkill-t.t),
"-t" should accept "v1", which means a plain number should be accepted for
UNIX98-style PTY's.
Modified:
head/bin/pkill/pkill.c
Modified: head/bin/pkill/pkill.c
==============================================================================
--- head/bin/pkill/pkill.c Mon Jan 4 10:25:00 2010 (r201483)
+++ head/bin/pkill/pkill.c Mon Jan 4 10:37:07 2010 (r201484)
@@ -670,9 +670,6 @@ makelist(struct listhead *head, enum lis
if (li->li_number == 0)
li->li_number = -1; /* any jail */
break;
- case LT_TTY:
- usage();
- /* NOTREACHED */
default:
break;
}
@@ -708,6 +705,10 @@ makelist(struct listhead *head, enum lis
if (stat(buf, &st) != -1)
goto foundtty;
+ snprintf(buf, sizeof(buf), _PATH_DEV "pts/%s", cp);
+ if (stat(buf, &st) != -1)
+ goto foundtty;
+
if (errno == ENOENT)
errx(STATUS_BADUSAGE, "No such tty: `%s'", sp);
err(STATUS_ERROR, "Cannot access `%s'", sp);
More information about the svn-src-all
mailing list