]> granicus.if.org Git - procps-ng/commit
pidof: check cmd if space in argv0
authorCraig Small <csmall@enc.com.au>
Sun, 17 Apr 2016 06:55:44 +0000 (16:55 +1000)
committerCraig Small <csmall@enc.com.au>
Sun, 17 Apr 2016 06:55:44 +0000 (16:55 +1000)
commit7fdab1fcc86045ea25fd22dd07e39ed6017a27bc
tree4227e09a0c5125f1ff005fc04e75aaf20221e339
parentd916d5db86cbbf552401026aab15c3663412d662
pidof: check cmd if space in argv0

A difference in behaviour between the sysvinit and procps pidof
was that the procps one would sometimes not find process that
the sysvinit one did.

The difference is that if a space is found in argv[0] then sysvinit
would look at cmd for a match. This isn't perfect and more of a
best guess but does often work.

procps pidof now follows the same "standard". The most obvious
difference is with kde based processes and incoming ssh connections
with sshd.

References:
 Commit 3f5b75035ec4151a5ffe911b0857d0419ffb5a15
 GitLab issue #4
 https://gitlab.com/procps-ng/procps/issues/4
 https://github.com/limingth/sysvinit/blob/master/sysvinit-2.88dsf/src/killall5.c#L800
NEWS
pidof.c