diff options
author | pjd <pjd@FreeBSD.org> | 2010-10-08 15:02:15 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2010-10-08 15:02:15 +0000 |
commit | 322c5f284ccbd6d271a268a96bfbd4ce3177c5e9 (patch) | |
tree | 783cba796469469427d6fa65d6fde165e79e2735 /sbin | |
parent | 6074b9919be0ccfcca13ada88c96f56e2b3aebfb (diff) | |
download | FreeBSD-src-322c5f284ccbd6d271a268a96bfbd4ce3177c5e9.zip FreeBSD-src-322c5f284ccbd6d271a268a96bfbd4ce3177c5e9.tar.gz |
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@gmail.com>
MFC after: 3 days
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/hastd/control.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/hastd/control.c b/sbin/hastd/control.c index b1cb10b..49e0d74 100644 --- a/sbin/hastd/control.c +++ b/sbin/hastd/control.c @@ -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; } |