Re: Field size in ps

1999-01-25 Thread J. S. Connell
I believe the problems with pidof and daemons only arise when the daemon does such funky things as changing argv[]. For example, sendmail - pidof sendmail doesn't find anything, whereas killall does[1]. I suspect this is correctable and possibly a bug in pidof, but this is the state of affairs at

Re: Field size in ps

1999-01-25 Thread John Hasler
Raul Miller writes: > Only works if you're guaranteed that there's only one running instance > of the daemon. I wrote: > ??? > > hasler/~ pidof xterm > 30423 30422 30421 30420 30419 > hasler/~ Raul Miller writes: > xterm is not a daemon What's that got to do with it? hasler/~ pidof nfsiod 7 6

Re: Field size in ps

1999-01-25 Thread Raul Miller
Raul Miller writes: > > Only works if you're guaranteed that there's only one running instance > > of the daemon. John Hasler <[EMAIL PROTECTED]> wrote: > ??? > > hasler/~ pidof xterm > 30423 30422 30421 30420 30419 > hasler/~ xterm is not a daemon > > I seem to recally either policy or the pac

Re: Field size in ps

1999-01-25 Thread John Hasler
Raul Miller writes: > Only works if you're guaranteed that there's only one running instance > of the daemon. ??? hasler/~ pidof xterm 30423 30422 30421 30420 30419 hasler/~ > I seem to recally either policy or the packaging manual recommending > against using pidof for start/stop scripts. Can

Re: Field size in ps

1999-01-25 Thread Raul Miller
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 <[EMAIL PROTECTED]> wrote: > Why not use pidof ? Only works if

Re: Field size in ps

1999-01-25 Thread John Hasler
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. Why not use pidof ? > I am thinking of the case of machines that are up for long

Field size in ps

1999-01-24 Thread Bob Hilliard
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. The PID field in the ps output is 5 columns wide. Is it a safe assumption that the pid will never be l