summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-11-22 18:48:43 +0100
committerMichael Adam <obnox@samba.org>2013-11-22 18:49:45 +0100
commit198600ce42d16b1ba43605ff66585a3aa8853581 (patch)
treeccaf9592c449cc62516604382b26d0c1a5d2df20
parent38ef36d998284095c81d8028a51c9c8fd29b9acc (diff)
downloadtinyproxy-198600ce42d16b1ba43605ff66585a3aa8853581.tar.gz
tinyproxy-198600ce42d16b1ba43605ff66585a3aa8853581.zip
child: check return code of socket_blocking for accept in child_main
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to '')
-rw-r--r--src/child.c8
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.