child: check return code of socket_blocking for accept in child_main

Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Michael Adam 2013-11-22 18:48:43 +01:00
parent 38ef36d998
commit 198600ce42

View File

@ -260,7 +260,13 @@ static void child_main (struct child_s *ptr)
continue;
}
socket_blocking(listenfd);
ret = socket_blocking(listenfd);
if (ret != 0) {
log_message(LOG_ERR, "Failed to set listening "
"socket %d to blocking for accept: %s",
listenfd, strerror(errno));
exit(1);
}
/*
* We have a socket that is readable.