summaryrefslogtreecommitdiff
path: root/networking/httpd.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2006-04-12 18:24:37 +0000
committerBernhard Reutner-Fischer2006-04-12 18:24:37 +0000
commit67f641e75b685abe1588b634b409c1ee2ff68c22 (patch)
tree74b3e38f1b7caef23bbf06a92b6e5d05530d50a6 /networking/httpd.c
parent2c99851181a652358aa3ca58ef38c57e46ae02e4 (diff)
downloadbusybox-67f641e75b685abe1588b634b409c1ee2ff68c22.zip
busybox-67f641e75b685abe1588b634b409c1ee2ff68c22.tar.gz
- patch from Denis Vlasenko to add bb_xbind() and bb_xlisten()
Diffstat (limited to 'networking/httpd.c')
-rw-r--r--networking/httpd.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index 354c199..0f61741 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -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 */