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
This commit is contained in:
pjd 2010-10-08 15:02:15 +00:00
parent 6074b9919b
commit 322c5f284c

View File

@ -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;
}