Summary: | pgrep -f init doesn't show pid = 1, but pgrep -af init does | ||
---|---|---|---|
Product: | Base System | Reporter: | Enji Cooper <ngie> |
Component: | bin | Assignee: | Fernando ApesteguĂa <fernape> |
Status: | Closed Feedback Timeout | ||
Severity: | Affects Some People | CC: | fernape, jilles |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
Enji Cooper
2014-08-29 08:02:38 UTC
This was deliberately changed in SVN r192242, which excludes the pkill process itself and its ancestors, unless -a is given. Do you think a special case should be added here, or r192242 should be reverted? Note that the main sshd process may somewhat similarly be an ancestor (or not, even if the user is logged in via ssh). Why are you using pgrep on init anyway, given that its PID is always 1? (In reply to Jilles Tjoelker from comment #1) > This was deliberately changed in SVN r192242, which excludes the pkill > process itself and its ancestors, unless -a is given. Do you think a special > case should be added here, or r192242 should be reverted? Note that the main > sshd process may somewhat similarly be an ancestor (or not, even if the user > is logged in via ssh). I agree with bryan about the change for pkill, but it would be nice if pgrep defaulted to the old behavior :/. > Why are you using pgrep on init anyway, given that its PID is always 1? Just for testing purposes because I was trying to prove that I was sane based on the way I was using the tool :). (In reply to Garrett Cooper from comment #2) > (In reply to Jilles Tjoelker from comment #1) > > This was deliberately changed in SVN r192242, which excludes the pkill > > process itself and its ancestors, unless -a is given. Do you think a special > > case should be added here, or r192242 should be reverted? Note that the main > > sshd process may somewhat similarly be an ancestor (or not, even if the user > > is logged in via ssh). > > I agree with bryan about the change for pkill, but it would be nice if pgrep > defaulted to the old behavior :/. *brian Is this still considered a bug? The behavior is still the same in 14-CURRENT. |