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:
parent
bd3443f5fe
commit
6c89103e58
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user