]> git.evergreen-ils.org Git - OpenSRF.git/commit
Improved PID file handling in osrf_ctl.sh
authordbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 27 Mar 2011 21:36:25 +0000 (21:36 +0000)
committerdbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 27 Mar 2011 21:36:25 +0000 (21:36 +0000)
commiteaa998fb931a557c4c9caecf6e948557059c91bb
tree25fa663f46bf23dd6385bbe3f900583915304bf1
parent8545b5e5f76750ed230893edcca4922f4351b378
Improved PID file handling in osrf_ctl.sh

Joseph Lewis <joehms22@gmail.com> submitted a patch to address
https://bugs.launchpad.net/evergreen/+bug/741088 ("osrf_ctl.sh Doesn't check if
process is actually running")

As of this patch, when start_perl, start_c, or start_python are started and
existing PID files are found for those processes, instead of assuming that the
processes are actually running, osrf-ctl.sh now has the intelligence to check
the process list to see if there is a matching process. If no running process
is found, then the old PID file is removed and the start command is issued.

Two additional actions have been added, "smart_clear" and "clear_pid".

"smart_clear" checks the PID files against the running processes and removes
PID files where no running process is found. This is effectively invoked
under the covers when start_* is invoked and a PID file is found.

"clear_pid" deletes all PID files without checking to see if there are any
running processes. In most cases, it should only be invoked as part of an
automated boot sequence.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: Joseph Lewis <joehms22@gmail.com>
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2215 9efc2488-bf62-4759-914b-345cdb29e865
bin/osrf_ctl.sh.in