NetBSD-Bugs archive

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

bin/52626: unexpected behaavior from pkill(1)

>Number:         52626
>Category:       bin
>Synopsis:       pkill ignores "-g pgid" option if pattern is specified
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 18 09:35:00 +0000 2017
>Originator:     Paul Goyette
>Release:        NetBSD 8.99.3
| 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 |
System: NetBSD 8.99.3 NetBSD 8.99.3 (SPEEDY 2017-10-02 09:48:54 UTC) #0: Mon Oct 2 14:15:08 UTC 2017 amd64
Architecture: x86_64
Machine: amd64
	Based on the description in the man page, the pkill command
	should send the designated signal to "all processes that match
	the criteria given."  One would expect criteria to match the
	pattern as well as the other selection criteria such as -g

	However, the command "pkill -g 123 mail" ends up trying to
	kill all processes whose command name does not include the
	pattern "mail".  If run as root, it kills everything, including
	init (process 1).

	Not good.
	Execute the following command as root and watch your system

		pkill -g 123 mail

Yes, please do.


Home | Main Index | Thread Index | Old Index