summaryrefslogtreecommitdiffstats
path: root/sbin/hastd
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-08-05 18:58:00 +0000
committerpjd <pjd@FreeBSD.org>2010-08-05 18:58:00 +0000
commit25464151ef8b7f02e9228c7f27af79d7776e6c16 (patch)
tree8e9ad4169b36cf78d42fc2c477bf6f547ca09582 /sbin/hastd
parented23731ef16b7c809bc104a6ac534061a4f2f2f4 (diff)
downloadFreeBSD-src-25464151ef8b7f02e9228c7f27af79d7776e6c16.zip
FreeBSD-src-25464151ef8b7f02e9228c7f27af79d7776e6c16.tar.gz
Reset signal handlers after fork().
MFC after: 1 month
Diffstat (limited to 'sbin/hastd')
-rw-r--r--sbin/hastd/primary.c3
-rw-r--r--sbin/hastd/secondary.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index ae74220..58e6cea 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -761,6 +761,9 @@ hastd_primary(struct hast_resource *res)
setproctitle("%s (primary)", res->hr_name);
+ signal(SIGHUP, SIG_DFL);
+ signal(SIGCHLD, SIG_DFL);
+
init_local(res);
if (init_remote(res, NULL, NULL))
sync_start();
diff --git a/sbin/hastd/secondary.c b/sbin/hastd/secondary.c
index b4549b0..a0fae63 100644
--- a/sbin/hastd/secondary.c
+++ b/sbin/hastd/secondary.c
@@ -340,6 +340,9 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin)
setproctitle("%s (secondary)", res->hr_name);
+ signal(SIGHUP, SIG_DFL);
+ signal(SIGCHLD, SIG_DFL);
+
/* Error in setting timeout is not critical, but why should it fail? */
if (proto_timeout(res->hr_remotein, 0) < 0)
pjdlog_errno(LOG_WARNING, "Unable to set connection timeout");
OpenPOWER on IntegriCloud