]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Have bosserver catch SIGTERM and shut down gracefully.
authorAdam Megacz <adam@megacz.com>
Mon, 15 Feb 2010 01:30:42 +0000 (17:30 -0800)
committerDerrick Brashear <shadow@dementia.org>
Mon, 15 Feb 2010 21:13:37 +0000 (13:13 -0800)
commit79ad82ccde98391ba59dc1234c10def78520b680
tree5ce6df8a8763d723b7d14ad84890df10a7083867
parent8ea6c727aa60dc60d5bc18a476f673554aaffff5
Have bosserver catch SIGTERM and shut down gracefully.

Many modern process supervision systems (runsv, daemontools, sysvinit)
expect to be able to terminate a process gracefully by sending it a
SIGTERM; although SIGQUIT is nominally used for this purpose it seems
to have fallen into disuse as a matter of practice.  Therefore, to
integrate as smoothly as possible with the outside world, bosserver
should catch SIGTERM and interpret it as a request to shut down
gracefully.

When used with process supervision (runsv or daemontools), the
previous behavior would cause bosserver to die but leave its children
running, and then bosserver would get restarted by the supervisor.
The result is a situation where there would be two copies of every
bnode process.  Mayhem ensues.

Change-Id: I8690fba0af6c2b9f9613527254af915be9e76dfc
Reviewed-on: http://gerrit.openafs.org/1310
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/bozo/bnode.c