Bug 201588 - [PATCH] make pkill/pgrep -j ARG take jname, not just jid
Summary: [PATCH] make pkill/pgrep -j ARG take jname, not just jid
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Jamie Gritton
URL:
Keywords: easy, feature, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-07-15 14:48 UTC by danielsh
Modified: 2015-08-29 02:48 UTC (History)
3 users (show)

See Also:


Attachments
patch, v1 (5.59 KB, patch)
2015-07-15 14:48 UTC, danielsh
no flags Details | Diff
patch, v2 (5.65 KB, patch)
2015-08-06 20:02 UTC, danielsh
no flags Details | Diff
some small changes (5.43 KB, patch)
2015-08-09 17:44 UTC, Jamie Gritton
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description danielsh 2015-07-15 14:48:45 UTC
Created attachment 158800 [details]
patch, v1

Currently, in 'pgrep -j ARG', ARG must be a jid; jnames are not accepted.  This patch adds support for jnames in addition to jids.  Tests included.
Comment 1 danielsh 2015-08-06 20:02:17 UTC
Created attachment 159627 [details]
patch, v2

Attached an updated patch: v2 is like v1 but with an updated comment in the tests.  Reviewed by brd@.
Comment 2 Jamie Gritton freebsd_committer 2015-08-09 17:44:20 UTC
Created attachment 159698 [details]
some small changes

A few proposed changes to this patch:
<sys/jail.h> isn't needed.
Rather than commenting on why LT_JID is no longer a good name, let's just make it good.
And a blank line where it looks good :-)
Comment 3 danielsh 2015-08-22 04:22:20 UTC
(In reply to Jamie Gritton from comment #2)
These changes look good to me. Is there anything else I need to do?
Comment 4 Jamie Gritton freebsd_committer 2015-08-22 04:50:02 UTC
No, nothing else - I've just not been good at getting it off the back burner.
Comment 5 commit-hook freebsd_committer 2015-08-22 05:05:22 UTC
A commit references this bug:

Author: jamie
Date: Sat Aug 22 05:04:38 UTC 2015
New revision: 287012
URL: https://svnweb.freebsd.org/changeset/base/287012

Log:
  Make pkill/pgrep -j ARG take jname, not just jid.

  PR:		201588
  Submitted by:	Daniel Shahaf <danielsh at apache.org>
  MFC after:	3 days

Changes:
  head/bin/pkill/Makefile
  head/bin/pkill/Makefile.depend
  head/bin/pkill/pkill.1
  head/bin/pkill/pkill.c
  head/bin/pkill/tests/pgrep-j_test.sh
  head/bin/pkill/tests/pkill-j_test.sh
Comment 6 commit-hook freebsd_committer 2015-08-29 02:42:48 UTC
A commit references this bug:

Author: jamie
Date: Sat Aug 29 02:42:01 UTC 2015
New revision: 287269
URL: https://svnweb.freebsd.org/changeset/base/287269

Log:
  MFC r287012:

    Make pkill/pgrep -j ARG take jname, not just jid.

  PR:		201588
  Submitted by:	Daniel Shahaf <danielsh at apache.org>

Changes:
_U  stable/10/
  stable/10/bin/pkill/Makefile
  stable/10/bin/pkill/pkill.1
  stable/10/bin/pkill/pkill.c
  stable/10/bin/pkill/tests/pgrep-j_test.sh
  stable/10/bin/pkill/tests/pkill-j_test.sh