From owner-freebsd-hackers Tue May 23 06:51:44 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id GAA03379 for hackers-outgoing; Tue, 23 May 1995 06:51:44 -0700 Received: from terra.stack.urc.tue.nl (terra.stack.urc.tue.nl [131.155.140.128]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id GAA03366 for ; Tue, 23 May 1995 06:51:39 -0700 Received: from zen.stack.urc.tue.nl (zen.stack.urc.tue.nl [131.155.140.130]) by terra.stack.urc.tue.nl (8.6.11) with ESMTP id PAA25820 for ; Tue, 23 May 1995 15:51:18 +0200 Received: (sven@localhost) by zen.stack.urc.tue.nl (8.6.10/8.6.4) id PAA27529 for freebsd-hackers@freebsd.org; Tue, 23 May 1995 15:51:26 +0200 From: sven@stack.urc.tue.nl (Sven Berkvens) Message-Id: <199505231351.PAA27529@zen.stack.urc.tue.nl> Subject: accept(2) and listen(2) To: freebsd-hackers@FreeBSD.org Date: Tue, 23 May 1995 15:51:25 +0200 (MET DST) X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 645 Sender: hackers-owner@FreeBSD.org Precedence: bulk Hi everyone! Just a small question about listen(2) and accept(2). Say I make a process A which creates a socket, binds it to a port, and does a listen(2) on it. Then I fork the process, which creates another process B. Now I make both A and B accept(2) on the socket. What happens if a connection attempt is made? Does A or B get it, or is this random? Or does only A get it? A little remark about listen(2). In the manpage it is stated that listen(2) only supports a maximum of 5 pending connections in its queue. Is this number hardcoded? If so, where can I change it :) ? Thanks for looking at this, Sven Berkvens (sven@stack.urc.tue.nl)