Fix control socket leak when worker process exits.

Submitted by:	Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	3 days
This commit is contained in:
pjd 2010-04-16 06:47:29 +00:00
parent d54e6dc056
commit 9358f8fa2b

View File

@ -137,6 +137,7 @@ child_exit(void)
pjdlog_error("Worker process failed (pid=%u, status=%d).",
(unsigned int)pid, WEXITSTATUS(status));
}
proto_close(res->hr_ctrl);
res->hr_workerpid = 0;
if (res->hr_role == HAST_ROLE_PRIMARY) {
sleep(1);