Commit Graph

4 Commits

Author SHA1 Message Date
Brian Somers
0a091aebde When finding processes, ignore ourself and our ancestors. It is almost
always surprising when you kill a 'sh -c ...' ancestor or when you kill
yourself when using -f.

Add a -a switch for backwards compatibility.

MFC after:	3 weeks
2009-05-17 04:34:14 +00:00
Ed Schouten
18aa158f77 Improve the `pkill -t' handling, which I changed in my previous commit.
In my previous commit I disabled pkill(1)'s automatic prepending of the
"tty" string when `pkill -t' was being used. Re-enable it and stat()
both possible device names when called.

Requested by:	jhb, rwatson (MFC)
MFC after:	1 month
2008-09-30 17:30:39 +00:00
Ed Schouten
eb948eac0d Don't automatically prepend the "tty" prefix to `pkill -t' arguments.
Because we now enforce UNIX98-style PTY's, we now use a lot of TTY's
that don't have the traditional /dev/ttyXX naming scheme. pkill(1)'s -t
flag automatically prepended the word "tty" to each TTY that was passed
on the command line. This meant that `pkill -t pts/0' was actually
converted to /dev/ttypts/0. Disable this broken behaviour for now.

Reported by:	erwin
2008-09-28 16:44:15 +00:00
Yaroslav Tykhiy
21be3b3183 pkill(1) first appeared in /usr/bin, but later it was moved to /bin
for the convenience of rc.d.  Now it has happily lived there for quite
a while.  So move the pkill(1) source files from usr.bin to bin, too.

Approved by:	gad
2008-08-31 14:27:59 +00:00