9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] accept in dial(2)
@ 2004-08-17  3:30 geoff
  2004-08-17 15:36 ` andrey mirtchovski
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: geoff @ 2004-08-17  3:30 UTC (permalink / raw)
  To: 9fans

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?


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-08-18 19:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-17  3:30 [9fans] accept in dial(2) geoff
2004-08-17 15:36 ` andrey mirtchovski
2004-08-17 16:03   ` rog
2004-08-17 17:51 ` rog
2004-08-17 21:12 ` Russ Cox
2004-08-18 17:33   ` rog
2004-08-18 19:18     ` boyd, rounin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).