summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-09-22 18:39:43 +0000
committerpjd <pjd@FreeBSD.org>2010-09-22 18:39:43 +0000
commit33133813bc111e96a5547ed64e6b6a98b617affa (patch)
tree9b3861756de486b523592d311ddc5953a39cd797 /sbin
parente7991e6689850690c0f173079fa3824a81b251cf (diff)
downloadFreeBSD-src-33133813bc111e96a5547ed64e6b6a98b617affa.zip
FreeBSD-src-33133813bc111e96a5547ed64e6b6a98b617affa.tar.gz
If we are unable to receive control message is most likely because the main
process died. Instead of entering infinite loop, terminate. MFC after: 3 days
Diffstat (limited to 'sbin')
-rw-r--r--sbin/hastd/control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/hastd/control.c b/sbin/hastd/control.c
index 4d5a407..fed9130 100644
--- a/sbin/hastd/control.c
+++ b/sbin/hastd/control.c
@@ -387,7 +387,8 @@ ctrl_thread(void *arg)
pthread_exit(NULL);
pjdlog_errno(LOG_ERR,
"Unable to receive control message");
- continue;
+ kill(getpid(), SIGTERM);
+ pthread_exit(NULL);
}
cmd = nv_get_uint8(nvin, "cmd");
if (cmd == 0) {
OpenPOWER on IntegriCloud