Bug#926896: sysvinit-utils: pidof is unreliable

Mark Hindley mark at hindley.org.uk
Wed Oct 20 17:29:39 BST 2021


On Wed, Oct 20, 2021 at 11:29:23AM -0300, Jesse Smith wrote:
> Is there a reason for wanting to revert this behaviour instead of using
> the "-z" flag on the command line? If you use pidof a lot and expect to
> see processes that are in the uninterruptable sleep state then making an
> alias of pidof='pidof -z' seems like a straight forward approach.

I am trying to get a consensus on how we deal with this.

Personally, I was convinced by Tim's argument, particularly the one of least
surprise. I too would expect pidof to return processes in D.

Yes, a user could create an alias, but I am sure that pidof is used in scripts
where that approach is more difficult. And it is conceivable, although
undocumented to my knowledge, that such script usage has been broken by this

Also start-stop-daemon is now a binary and no longer uses pidof as its script
predecessor did. Therefore the original report[1] that requested this change is

Going forward, my gut reaction is that if start-stop-daemon still fails in the
case of stuck NFS mounts, that should be addressed in src:dpkg rather than by
excluding processes from pidof.

But I am open to be persuaded! It is a difficult issue that benefits from
diverse minds and approaches.



[1]  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719273

More information about the Debian-init-diversity mailing list