diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-04-12 18:24:37 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-04-12 18:24:37 +0000 |
commit | 67f641e75b685abe1588b634b409c1ee2ff68c22 (patch) | |
tree | 74b3e38f1b7caef23bbf06a92b6e5d05530d50a6 /networking/httpd.c | |
parent | 2c99851181a652358aa3ca58ef38c57e46ae02e4 (diff) | |
download | busybox-w32-67f641e75b685abe1588b634b409c1ee2ff68c22.tar.gz busybox-w32-67f641e75b685abe1588b634b409c1ee2ff68c22.tar.bz2 busybox-w32-67f641e75b685abe1588b634b409c1ee2ff68c22.zip |
- patch from Denis Vlasenko to add bb_xbind() and bb_xlisten()
Diffstat (limited to 'networking/httpd.c')
-rw-r--r-- | networking/httpd.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 354c199e7..0f6174140 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -958,12 +958,9 @@ static int openServer(void) | |||
958 | #else | 958 | #else |
959 | setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)) ; | 959 | setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)) ; |
960 | #endif | 960 | #endif |
961 | if (bind(fd, (struct sockaddr *)&lsocket, sizeof(lsocket)) == 0) { | 961 | bb_xbind(fd, (struct sockaddr *)&lsocket, sizeof(lsocket)); |
962 | listen(fd, 9); | 962 | listen(fd, 9); /* bb_xlisten? */ |
963 | signal(SIGCHLD, SIG_IGN); /* prevent zombie (defunct) processes */ | 963 | signal(SIGCHLD, SIG_IGN); /* prevent zombie (defunct) processes */ |
964 | } else { | ||
965 | bb_perror_msg_and_die("bind"); | ||
966 | } | ||
967 | return fd; | 964 | return fd; |
968 | } | 965 | } |
969 | #endif /* CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY */ | 966 | #endif /* CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY */ |