#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <fcntl.h>
#include <errno.h>
#include <string.h>
close(fd);
return(-1);
}
- if(listen(fd, 16) < 0) {
+ if(listen(fd, 128) < 0) {
close(fd);
return(-1);
}
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
return(fd);
}
close(fd);
return(-1);
}
- if(listen(fd, 16) < 0) {
+ if(listen(fd, 128) < 0) {
close(fd);
return(-1);
}
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
return(fd);
}