[Spread-users] pid and process control
Michael Peters
mpeters at plusthree.com
Fri Jul 25 17:56:58 EDT 2008
Dave Koberstein wrote:
> I don't recall that I observed a way to tell spread to leave it's own
> pid file.
Ok, just thought of it since configure mentions it.
> In your startup script, test the return code of spread to be sure it
> started successfully and then use `pidof` to get the pid and write it
> out to the file you want to. Don't forget to clean it up on stop.
Yeah, that's what I'm currently doing. But it seems kind of brittle.
> I see your note about return code in perl. I don't know that I've seen
> it fail to start so maybe there is an issue that it always returns 0.
It's not a Perl problem. Try the following:
] spread &
] spread & # this should fail
] echo $?
it will always print "0" even though the last command failed.
--
Michael Peters
Plus Three, LP
More information about the Spread-users
mailing list