Re: [patch] Use the same backlog parameter for listen() function in netcat.c
I don't see the point of making such a change. Nan Xiao wrote: > Hi tech@, > > Since netcat can only process one connection at one time, maybe > UNIX-domain socket can use the same backlog parameter for listen() > function as network socket, thanks! > > diff --git netcat.c netcat.c > index 341e7e5..b6fd199 100644 > --- netcat.c > +++ netcat.c > @@ -894,7 +894,7 @@ unix_listen(char *path) > if ((s = unix_bind(path, 0)) < 0) > return -1; > > - if (listen(s, 5) < 0) { > + if (listen(s, 1) < 0) { > close(s); > return -1; > } > -- > Best Regards > Nan Xiao >
[patch] Use the same backlog parameter for listen() function in netcat.c
Hi tech@, Since netcat can only process one connection at one time, maybe UNIX-domain socket can use the same backlog parameter for listen() function as network socket, thanks! diff --git netcat.c netcat.c index 341e7e5..b6fd199 100644 --- netcat.c +++ netcat.c @@ -894,7 +894,7 @@ unix_listen(char *path) if ((s = unix_bind(path, 0)) < 0) return -1; - if (listen(s, 5) < 0) { + if (listen(s, 1) < 0) { close(s); return -1; } -- Best Regards Nan Xiao