diff options
author | Michael Adam <obnox@samba.org> | 2013-11-22 18:48:43 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-11-22 18:49:45 +0100 |
commit | 198600ce42d16b1ba43605ff66585a3aa8853581 (patch) | |
tree | ccaf9592c449cc62516604382b26d0c1a5d2df20 | |
parent | 38ef36d998284095c81d8028a51c9c8fd29b9acc (diff) |
child: check return code of socket_blocking for accept in child_main
Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r-- | src/child.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/child.c b/src/child.c index e7e4b35..da82139 100644 --- a/src/child.c +++ b/src/child.c @@ -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. |