Re: Field size in ps
Bob Hilliard writes:
> > I am working on improving the startup file for a daemon that doesn't
> > handle its pid file properly and consistently. I am getting the pid by
> > piping the output of ps ax through grep and cut.
John Hasler <firstname.lastname@example.org> wrote:
> Why not use pidof ?
Only works if you're guaranteed that there's only one running instance
of the daemon. [Consider, for example, a daemon which listens at
a port, where there's an option to let it listen at some other port.]
I seem to recally either policy or the packaging manual recommending
against using pidof for start/stop scripts. [And, start-stop-daemon
is a bit clunky for some of these kinds of things.]