diff options
author | pjd <pjd@FreeBSD.org> | 2011-01-27 19:33:57 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2011-01-27 19:33:57 +0000 |
commit | 6c89103e586f6d31c305bbb253a4ce363014df04 (patch) | |
tree | 109a2b13ad8c0dc7999e3e1f1609b9e00cdd7103 /sbin | |
parent | bd3443f5fe8612acf4d4765665cf0eec5ead83e4 (diff) | |
download | FreeBSD-src-6c89103e586f6d31c305bbb253a4ce363014df04.zip FreeBSD-src-6c89103e586f6d31c305bbb253a4ce363014df04.tar.gz |
Remember created control connection so on fork(2) we can close it in child.
Found with: procstat(1)
MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/hastd/control.c | 2 | ||||
-rw-r--r-- | sbin/hastd/hast.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sbin/hastd/control.c b/sbin/hastd/control.c index 87fa42a..4faf05d 100644 --- a/sbin/hastd/control.c +++ b/sbin/hastd/control.c @@ -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; } /* diff --git a/sbin/hastd/hast.h b/sbin/hastd/hast.h index a42865f..b86ed62 100644 --- a/sbin/hastd/hast.h +++ b/sbin/hastd/hast.h @@ -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. */ |