]> git.evergreen-ils.org Git - OpenSRF.git/commit
Changed the signal handling.
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 2 Nov 2009 14:41:22 +0000 (14:41 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 2 Nov 2009 14:41:22 +0000 (14:41 +0000)
commit61fe442042aa82b09202111fe3656cf464bbd2b9
tree1b3cbadb43d7db96b7e0969d0fce87a481ed7ec4
parentc471145f680443a83e721bd6fbe79a178b090d4c
Changed the signal handling.

There are very few things you can safely do within a signal handler, and
shutting down an osrfRouter is not among them.

Now the signal handler just sets a switch for the main loop to look at.
The select call looks for errno == EINTR and then looks at the switch
that the signal handler sets.  If the switch is set, we exit the otherwise
infinite loop.  Then we free the osrfRouter and re-raise the signal.

M    src/router/osrf_router.h
M    src/router/osrf_router.c
M    src/router/osrf_router_main.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1836 9efc2488-bf62-4759-914b-345cdb29e865
src/router/osrf_router.c
src/router/osrf_router.h
src/router/osrf_router_main.c