Red Hat Bugzilla – Bug 63440
RFE: better use of functions in /etc/rc.d/init.d/functions
Last modified: 2007-11-30 17:10:30 EST
I'm building RPMs for some daemons that don't store their PID file in /var/run
(for example, one does not run as root so doesn't have permission).
There is some code duplication in /etc/rc.d/init.d/functions, especially with
respect to finding the PID of a program. If everything used pidfileofproc()
instead of doing the lookup itself, it would make it much easier to handle
daemons with non-standard PID file locations (just override pidfileofproc()
instead of having to override a bunch of other things as well).
Also, it would be nice to have an option to daemon() to not limit core dump size
to zero. I was debugging a daemon, and I explicitly unlimited core dump size
(after making sure that it was in a safe directory, etc.), but I didn't realize
for quite a while that daemon() set core dump size to zero. That is a sensible
default, but it would be nice to be able to easily override it (otherwise, I
have to write all my init scripts to not use the Red Hat provided functions).
FWIW, seems a sensible approach. Further, the initscripts could be extended to
look at pid files under in /var/run/*/*.pid, for exactly the reason stated. I
maintain one package (radvd) which uses /var/run/radvd/radvd.pid because of the
Created attachment 123705 [details]
Remaining patch for redhat-lsb
There is somewhat less code repetition in initscripts-8.22-1, and the
pid file location can be changed.
Core dump size can be defined using $DAEMON_COREFILE_LIMIT.
Thanks for your report.
Thanks. I like using an environment variable for the core file limit; I can
override it for debugging without having to edit scripts that way.