- 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

View File

@@ -461,14 +461,8 @@ telnetd_main(int argc, char **argv)
sa.sin_addr = bind_addr;
#endif
if (bind(master_fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
bb_perror_msg_and_die("bind");
}
if (listen(master_fd, 1) < 0) {
bb_perror_msg_and_die("listen");
}
bb_xbind(master_fd, (struct sockaddr *) &sa, sizeof(sa));
bb_xlisten(master_fd, 1);
bb_xdaemon(0, 0);
maxfd = master_fd;