From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 10:37:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B6021065695; Mon, 4 Jan 2010 10:37:08 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1598FC14; Mon, 4 Jan 2010 10:37:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o04Ab7eg031250; Mon, 4 Jan 2010 10:37:07 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04Ab7S6031248; Mon, 4 Jan 2010 10:37:07 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001041037.o04Ab7S6031248@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 10:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201484 - head/bin/pkill X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 10:37:08 -0000 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);