Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Oct 2010 15:02:15 +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: r213579 - head/sbin/hastd
Message-ID:  <201010081502.o98F2FZK097443@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Fri Oct  8 15:02:15 2010
New Revision: 213579
URL: http://svn.freebsd.org/changeset/base/213579

Log:
  We close the event socketpair early in the mainloop to prevent spaming with
  error messages, so when we clean up after child process, we have to check if
  the event socketpair is still there.
  
  Submitted by:	Mikolaj Golub <to.my.trociny@gmail.com>
  MFC after:	3 days

Modified:
  head/sbin/hastd/control.c

Modified: head/sbin/hastd/control.c
==============================================================================
--- head/sbin/hastd/control.c	Fri Oct  8 14:59:45 2010	(r213578)
+++ head/sbin/hastd/control.c	Fri Oct  8 15:02:15 2010	(r213579)
@@ -58,8 +58,10 @@ child_cleanup(struct hast_resource *res)
 
 	proto_close(res->hr_ctrl);
 	res->hr_ctrl = NULL;
-	proto_close(res->hr_event);
-	res->hr_event = NULL;
+	if (res->hr_event != NULL) {
+		proto_close(res->hr_event);
+		res->hr_event = NULL;
+	}
 	res->hr_workerpid = 0;
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010081502.o98F2FZK097443>