Provide a mechanism whereby a server drone can terminate immediately,
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 24 Jun 2010 16:56:45 +0000 (16:56 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 24 Jun 2010 16:56:45 +0000 (16:56 +0000)
commit3a67336ea60eba9573dd94878faacd89a984b304
treedaa6884e1a0cbd26c3b9627785b4af972d5e0126
parent0cf3d031692c1a413cfe909243f21a9e01ebe1c2
Provide a mechanism whereby a server drone can terminate immediately,
without waiting for max_requests or a DISCONNECT message.

Motivation: a drone may determine that it is incapacitated and can neither
complete the current request nor service subsequent ones.

In particular, it may lose a database connection.

Mechanism: set a switch in the current osrfAppSession.  In osrf_prefork.c,
inspect this switch after every method call, and bail out if it's set.

M    include/opensrf/osrf_app_session.h
M    src/libopensrf/osrf_app_session.c
M    src/libopensrf/osrf_prefork.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1969 9efc2488-bf62-4759-914b-345cdb29e865
include/opensrf/osrf_app_session.h
src/libopensrf/osrf_app_session.c
src/libopensrf/osrf_prefork.c