nmdb: Add a signal handler to change to read-only mode
commit18874eeaa69888c7b37108071de690dacb6120e0
authorAlberto Bertogli <albertito@blitiri.com.ar>
Mon, 3 May 2010 04:44:51 +0000 (3 01:44 -0300)
committerAlberto Bertogli <albertito@blitiri.com.ar>
Mon, 3 May 2010 07:19:02 +0000 (3 04:19 -0300)
treec18d22b8f7c960ad01bc7856b25421fc9bfaaabb
parent81777f85eb0e6f4c3db6f8301911c0fb057da143
nmdb: Add a signal handler to change to read-only mode

This patch adds a new signal handler that can be used to change to
read-only mode.

As SIGUSR1 is a nice signal to assign to this, but it is taken by the
log reopening. Since SIGHUP is the one traditionally used for that
purpose, we reassign them so now we have:

 - SIGHUP: reopen log file
 - SIGUSR1: switch to read-only mode
 - SIGUSR2: toggle passive mode

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
UPGRADING
nmdb/net.c
tests/coverage/coverage