NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/52626: unexpected behaavior from pkill(1)



The following reply was made to PR bin/52626; it has been noted by GNATS.

From: Paul Goyette <paul%whooppee.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: kre%netbsd.org@localhost
Subject: Re: bin/52626: unexpected behaavior from pkill(1)
Date: Thu, 19 Oct 2017 06:00:24 +0800 (+08)

 On Wed, 18 Oct 2017, Robert Elz wrote:
 
 >   | >How-To-Repeat:
 >   | 	Execute the following command as root and watch your system
 >   | 	die:
 >   |
 >   | 		pkill -g 123 mail
 >
 > Did you perhaps have -v in there as well when you were testing, perhaps
 > assuming it meant something like verbose?
 
 Yeah, the actual command was
 
  	pkill -g 123 -vx mail
 
 (My "extract-and-paraphrase the example from something bigger" has not 
 been working very well lately.)
 
 I realize now that the -v inverts the selection sense for both the 
 pattern(s) _and_ for the other match criteria.  And thus it's doing 
 exactly what it should do although it was quite unexpected.
 
 Perhaps it would be nice to have a -V option which inverts only the 
 selection sense for pattern matching?  So it would do what I wanted, 
 affecting "all processes in p-group 123 with command name NOT mail" ?
 
 
 
 +------------------+--------------------------+----------------------------+
 | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
 | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
 | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
 +------------------+--------------------------+----------------------------+
 


Home | Main Index | Thread Index | Old Index