Bug#1033311: sysvinit-utils: pidof not always returning a pid, when using the full path to a program
Mark Hindley
mark at hindley.org.uk
Wed Mar 29 14:09:19 BST 2023
On Wed, Mar 29, 2023 at 08:37:00AM -0300, Jesse Smith wrote:
> > Given subsequent discussion, could we instead use canonicalize_file_name
> > or realpath here instead? That would give us the "correct" path without
> > pidof having to think hard about symlinks et al.
>
> I'm open to the possibility. I'm curious as to what you see as the pros
> vs cons of changing the approach used by pidof?
Markus' orginal report suggested this was a regression since Bullseye
sysvinit-utils | 2.96-7+deb11u1 | stable | amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
rather than a proposal to change behaviour.
I think I have found the offending commit:
0b695c7e0b1cac60ed77c56f224e296f023b652e uses memset *after* realpath which wipes
the canonical resolved path.
I suggest this fix as a starting point.
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-following-of-executable-symlinks.patch
Type: text/x-diff
Size: 852 bytes
Desc: not available
URL: <http://www.chiark.greenend.org.uk/pipermail/debian-init-diversity/attachments/20230329/4a0503f5/attachment.patch>
More information about the Debian-init-diversity
mailing list