From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Mon, 16 Aug 2004 20:30:48 -0700 From: geoff@collyer.net To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] accept in dial(2) Topicbox-Message-UUID: d49c8e7a-eacd-11e9-9e20-41e7f4b1d025 There seems to be some confusion about which file descriptor accept should take as its first argument: the one announce returned, the one listen returned, or it doesn't matter. A quick kernel grep suggests that only port/devsdp.c still recognises the word "accept", per the comment write(ctl, buf, n); /* ignore return value, network might not need accepts */ at /sys/src/libc/9sys/announce.c:148. dial(2) says ``Accept accepts a call received by listen'', which isn't completely clear, but the example given uses the fd returned by listen, which makes sense to me. On the other hand, listen, listen1 and tftpd use the fd returned by announce. Does anybody know which fd accept should take, and if it matters?