[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: LSB-ish init script, RFC

Bill Nottingham wrote:
Matthew Farrellee (mfarrellee+fedora redhat com) said:
First, it wasn't sufficient for my service because anyone can run a copy of my service. They just have to have their own config file. Think of it like having both a system httpd, listening on port 80, and a user httpd, listening on port 1134. Both process names can easily be "httpd". This is a problem because /etc/init.d/functions' status() uses pidof, which can find a user's process and confuse it with a system process. This means running "service blah start" can silently fail because the init script thinks the service is already running, when only the user's copy of the service is running. To get around this I implemented my own rh_status, calling it pid_status, that uses a pidfile to determine if the service is running.

This seems to be a rather unusual case, though, especially since it implies
you'd need customization just to specify an alternate config file.


It can happen whenever a user process shares its name with a service's process. This just tends to be a common thing with my package.



P.S. I didn't see it mentioned anywhere in the wiki, but if you use killproc without a pidfile you can end up killing more things than you should.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]