Date: Wed, 22 Sep 2010 18:39:43 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r213004 - head/sbin/hastd Message-ID: <201009221839.o8MIdhQB039057@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Wed Sep 22 18:39:43 2010 New Revision: 213004 URL: http://svn.freebsd.org/changeset/base/213004 Log: 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 Modified: head/sbin/hastd/control.c Modified: head/sbin/hastd/control.c ============================================================================== --- head/sbin/hastd/control.c Wed Sep 22 18:38:02 2010 (r213003) +++ head/sbin/hastd/control.c Wed Sep 22 18:39:43 2010 (r213004) @@ -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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009221839.o8MIdhQB039057>