- patch from Denis Vlasenko to add bb_xbind() and bb_xlisten()

This commit is contained in:
Bernhard Reutner-Fischer
2006-04-12 18:24:37 +00:00
parent 2c99851181
commit 67f641e75b
10 changed files with 50 additions and 28 deletions
+3 -6
View File
@@ -958,12 +958,9 @@ static int openServer(void)
#else
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)) ;
#endif
if (bind(fd, (struct sockaddr *)&lsocket, sizeof(lsocket)) == 0) {
listen(fd, 9);
signal(SIGCHLD, SIG_IGN); /* prevent zombie (defunct) processes */
} else {
bb_perror_msg_and_die("bind");
}
bb_xbind(fd, (struct sockaddr *)&lsocket, sizeof(lsocket));
listen(fd, 9); /* bb_xlisten? */
signal(SIGCHLD, SIG_IGN); /* prevent zombie (defunct) processes */
return fd;
}
#endif /* CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY */