aboutsummaryrefslogtreecommitdiffstats
path: root/plpnfsd
diff options
context:
space:
mode:
Diffstat (limited to 'plpnfsd')
-rw-r--r--plpnfsd/mp_mount.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/plpnfsd/mp_mount.c b/plpnfsd/mp_mount.c
index b2fd3c8..a655fe8 100644
--- a/plpnfsd/mp_mount.c
+++ b/plpnfsd/mp_mount.c
@@ -139,6 +139,14 @@ hup_handler SIGARG
exiting = 5;
};
+static void
+term_handler SIGARG
+{
+ if (debug > 1)
+ debuglog("Got TERM signal\n");
+ exiting = 5;
+};
+
static void doexit() {
#ifndef DONT_UPDATE_MTAB
FILE *fpin, *fpout;
@@ -567,6 +575,7 @@ mount_and_run(char *dir, void (*proc)(), nfs_fh *root_fh)
*/
signal(SIGUSR1, usr1_handler);
signal(SIGHUP, hup_handler);
+ signal(SIGTERM, term_handler);
signal(SIGPIPE, SIG_IGN);
for (;;) {