If the main casperd process exits, zygote process should exit as well
instead of spinning. Reported by: Mikhail <mp@lenta.ru>
This commit is contained in:
parent
47c0296c2b
commit
9fa72e7466
@ -132,8 +132,13 @@ zygote_main(int sock)
|
||||
|
||||
for (;;) {
|
||||
nvlin = nvlist_recv(sock);
|
||||
if (nvlin == NULL)
|
||||
if (nvlin == NULL) {
|
||||
if (errno == ENOTCONN) {
|
||||
/* Casperd exited. */
|
||||
exit(0);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
func = (zygote_func_t *)(uintptr_t)nvlist_get_number(nvlin,
|
||||
"func");
|
||||
flags = (int)nvlist_get_number(nvlin, "flags");
|
||||
|
Loading…
Reference in New Issue
Block a user