pkill|pgrep are buggy

Bug #1413699 reported by Jens Elkner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
procps (Ubuntu)
New
Undecided
Unassigned

Bug Description

'pgrep upstart-udev-bridge' should definitely spit out a pid, but it doesn't. When one uses the option -f than it actually prints the PID of the upstart-udev-bridge process. However using -f is a bad workaround, because than (at least wrt. the man page) the arguments and operands get included into the match, which may break scripts or even lead to security issues.

I guess, the bug is, that p{grep|kill} strips off everything after the first '-' of the command before it actually tries to compare with the given operand (or something like that).

Jens Elkner (jelmd)
affects: system-config-kickstart (Ubuntu) → procps (Ubuntu)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

.... use $ status upstart-udev-bridge ?

After all said process is managed by upstart, why pgrep for it?

Revision history for this message
Jens Elkner (jelmd) wrote :

Please read carefully! This bug is not about upstart-udev-bridge or any other service but about PGREP . 'pgrep upstart-udev-bridge' is just an example, which should work on any Ubuntu, i.e. to reproduce the problem!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.