summaryrefslogtreecommitdiff
path: root/ext/socket/unixsocket.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-11 23:20:15 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-11 23:20:15 +0000
commit562257497691b7ddc8032a872693b23918aa5726 (patch)
treedf4b37b666f354ace45dde86c35fdd2f11e72a6e /ext/socket/unixsocket.c
parent9536568d3e46da2a028fcc5e15a79589f5187942 (diff)
* ext/socket/ipsocket.c (init_inetsock_internal): use SOMAXCONN for
listen backlog. * ext/socket/unixsocket.c (rsock_init_unixsock): ditto. * ext/socket/lib/socket.rb (Addrinfo#listen): ditto. (Socket.tcp_server_sockets_port0): ditto. * ext/socket/mkconstants.rb: define SOMAXCONN as 5 if not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/unixsocket.c')
-rw-r--r--ext/socket/unixsocket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index f29724d..f801792 100644
--- a/ext/socket/unixsocket.c
+++ b/ext/socket/unixsocket.c
@@ -66,7 +66,7 @@ rsock_init_unixsock(VALUE sock, VALUE path, int server)
}
if (server) {
- if (listen(fd, 5) < 0) {
+ if (listen(fd, SOMAXCONN) < 0) {
close(fd);
rb_sys_fail("listen(2)");
}