Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1292724

Bug#810018: new s-s-d pidof feature? (was Re: New Essential package procps-base)

From Guillem Jover <guillem@debian.org>
Newsgroups linux.debian.bugs.dist
Subject Bug#810018: new s-s-d pidof feature? (was Re: New Essential package procps-base)
Date 2026-05-07 21:00 +0200
Message-ID <MSc6Z-3loF-7@gated-at.bofh.it> (permalink)
References (1 earlier) <qNCOn-5m1-43@gated-at.bofh.it> <HAmSt-5BSD-7@gated-at.bofh.it> <MQDEl-2gQF-11@gated-at.bofh.it> <qNCOn-5m1-43@gated-at.bofh.it> <MQDEl-2gQF-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi!

On Sun, 2026-05-03 at 12:52:31 +0100, Andrew Bower wrote:
> On Wed, Nov 15, 2023 at 01:00:04PM +0100, Guillem Jover wrote:
> > On Tue, 2023-11-14 at 17:29:01 +1100, Craig Small wrote:
> > > The majority of usage of pidof is in init or pre/post scripts, which really
> > > should be using the LSB pidofproc function. That function in turn
> > > optionally uses pidof if the pidfile parameter is not given. That's
> > > probably a way forward for sometime in the future to not need procps-base
> > > Essential, but it is a way off.
> > 
> > I think the status_of_proc function could be switched to use
> > start-stop-daemon (s-s-d) --status instead of pidofproc. To replace
> > pidof inside pidofproc I guess s-s-d could grow some option to print
> > the pid, I'd be happy to implement that.
> 
> Thanks for this offer.
> 
> I wonder if this might well be worth doing if, as it sounds, it is a low
> effort, low footprint change that simply allows any patch to swap out
> pidof usage with a capability that will always be available regardless
> of all else that happens in this transition?
> 
> In the pecking order of resolutions to improve an initscript this would
> not be the first one I would go to but it would be handy to have in the
> arsenal and above adding a dependency on the 2M procps.
> 
> Would this still be agreeable?

I just checked now and it was really trivial. I'm undecided whether to
go with a new --print-pid command or an option to pass along the other
commands to print the PIDs matche. I'm attaching both patches, and will
be mulling over what feels like the better interface, before merging it
and after adding proper man page updates, for the next dpkg release.

Thanks,
Guillem

Back to linux.debian.bugs.dist | Previous | Next | Find similar


Thread

Bug#810018: new s-s-d pidof feature? (was Re: New Essential package procps-base) Guillem Jover <guillem@debian.org> - 2026-05-07 21:00 +0200

csiph-web