svn commit: r213579 - head/sbin/hastd

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Oct 8 15:02:16 UTC 2010


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 at 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;
 }
 


More information about the svn-src-head mailing list