Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
accesslog: Fixed quoting sign-extension.
[ashd.git]
/
src
/
plaintcp.c
diff --git
a/src/plaintcp.c
b/src/plaintcp.c
index
cf46b29
..
b898e37
100644
(file)
--- a/
src/plaintcp.c
+++ b/
src/plaintcp.c
@@
-22,6
+22,7
@@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <errno.h>
#include <string.h>
@@
-64,10
+65,11
@@
int listensock4(int port)
close(fd);
return(-1);
}
close(fd);
return(-1);
}
- if(listen(fd, 1
6
) < 0) {
+ if(listen(fd, 1
28
) < 0) {
close(fd);
return(-1);
}
close(fd);
return(-1);
}
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
return(fd);
}
return(fd);
}
@@
-88,10
+90,11
@@
int listensock6(int port)
close(fd);
return(-1);
}
close(fd);
return(-1);
}
- if(listen(fd, 1
6
) < 0) {
+ if(listen(fd, 1
28
) < 0) {
close(fd);
return(-1);
}
close(fd);
return(-1);
}
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
return(fd);
}
return(fd);
}