Bug#1033311: sysvinit-utils: pidof not always returning a pid when using the full path to a program

Jesse Smith jsmith at resonatingmedia.com
Wed Mar 22 15:38:34 GMT 2023

On 2023-03-22 8:31 a.m., Mark Hindley wrote:
> Markus,
> Thanks for this.
> On Wed, Mar 22, 2023 at 08:40:20AM +0100, Markus Fischer wrote:
>> Package: sysvinit-utils
>> Version: 3.06-2
>> Severity: normal
>> X-Debbugs-Cc: none
>> Dear Maintainer,
>> Passing the full path of a binary to the pidof command does not always
>> return a pid although the process is running and the man page of the
>> pidof command explicitly notes that it can be used that way.
>> This might be related to the fact that all programs with which I tested
>> this and which show this unexpected behaviour were symlinks (i.e.,
>> "which <PROGRAM>" returned a symlink).
> Yes, I just tried with vim.basic which is not a symlink on my system and both
>  pidof vim.basic
>  pidof $(which vim.basic)
> work as expected.
>> However, on Debian Bullseye the
>> behaviour is as I expected it.
> So this appears to be a change in behaviour. I suspect this is an inadvertent
> side-effect of 0b695c7e0b1cac60ed77c56f224e296f023b652e.
> Jesse, or was it intentional?

I made a fix for this and have pushed it to the 3.07 branch of the SysV
init repository. I'll publish a new version in a couple of days with
this fix. There were some other changes to killall5 which are also in
the queue, so this will fix a few issues.

Would be great to have someone check the updated pidof and report if
it's working okay for them too.

- Jesse

More information about the Debian-init-diversity mailing list