Remember created control connection so on fork(2) we can close it in child.

Found with:	procstat(1)
MFC after:	1 week
This commit is contained in:
Pawel Jakub Dawidek 2011-01-27 19:33:57 +00:00
parent c0dbce0016
commit 19654a238e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217969
2 changed files with 4 additions and 0 deletions

View File

@ -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 @@ control_handle(struct hastd_config *cfg)
if (nvout != NULL)
nv_free(nvout);
proto_close(conn);
cfg->hc_controlin = NULL;
}
/*

View File

@ -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. */