Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 May 1995 20:54:11 +0200 (MET DST)
From:      sven@stack.urc.tue.nl (Sven Berkvens)
To:        freebsd-questions@FreeBSD.org
Subject:   accept(2) system call
Message-ID:  <199505191854.UAA24537@zen.stack.urc.tue.nl>

next in thread | raw e-mail | index | archive | help
Hi everybody...

Just two small questions about accept(2) and listen(2).


The manual page (or was it the include file) states that the second parameter
supplied to listen(2) is the number of connections that the system will
buffer if accept(2) is not already waiting for a connection. It also
says that this number is silently limited to 5 pending connections.

My question: is it possible to make this number higher via some obscure
system call, or do I need to change the kernel? If the latter is the case,
where in the kernel do I change what?


And another question: if I have a process A, which opens a socket, binds
to a port and does a listen(2) on the socket, and then I fork(2) into two
processes, are both processes allowed to accept(2) anything from that
socket? If so, is it random which process returns from accept(2) if they
do an accept(2) at the same time?


Thank you for your time,
Sven Berkvens (sven@stack.urc.tue.nl)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505191854.UAA24537>