svn commit: r217969 - head/sbin/hastd
Pawel Jakub Dawidek
pjd at FreeBSD.org
Thu Jan 27 19:33:57 UTC 2011
Author: pjd
Date: Thu Jan 27 19:33:57 2011
New Revision: 217969
URL: http://svn.freebsd.org/changeset/base/217969
Log:
Remember created control connection so on fork(2) we can close it in child.
Found with: procstat(1)
MFC after: 1 week
Modified:
head/sbin/hastd/control.c
head/sbin/hastd/hast.h
Modified: head/sbin/hastd/control.c
==============================================================================
--- head/sbin/hastd/control.c Thu Jan 27 19:32:53 2011 (r217968)
+++ head/sbin/hastd/control.c Thu Jan 27 19:33:57 2011 (r217969)
@@ -278,6 +278,7 @@ control_handle(struct hastd_config *cfg)
return;
}
+ cfg->hc_controlin = conn;
nvin = nvout = NULL;
role = HAST_ROLE_UNDEF;
@@ -384,6 +385,7 @@ close:
if (nvout != NULL)
nv_free(nvout);
proto_close(conn);
+ cfg->hc_controlin = NULL;
}
/*
Modified: head/sbin/hastd/hast.h
==============================================================================
--- head/sbin/hastd/hast.h Thu Jan 27 19:32:53 2011 (r217968)
+++ head/sbin/hastd/hast.h Thu Jan 27 19:33:57 2011 (r217969)
@@ -101,6 +101,8 @@ struct hastd_config {
char hc_controladdr[HAST_ADDRSIZE];
/* Protocol-specific data. */
struct proto_conn *hc_controlconn;
+ /* Incoming control connection. */
+ struct proto_conn *hc_controlin;
/* Address to listen on. */
char hc_listenaddr[HAST_ADDRSIZE];
/* Protocol-specific data. */
More information about the svn-src-all
mailing list