9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <russcox@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>,
	Dave Presotto <presotto@closedmind.org>
Subject: Re: [9fans] accept in dial(2)
Date: Tue, 17 Aug 2004 17:12:28 -0400	[thread overview]
Message-ID: <ee9e417a040817141263a907ce@mail.gmail.com> (raw)
In-Reply-To: <fa2bd26e06e99ec4303411b3e28ec90b@collyer.net>

[I forwarded geoff's original post to Dave Presotto,
who is not reading 9fans as vigorously as usual.
I'm posting this because his gmail account is not
authorized to send to 9fans.]

From: David Presotto
To: 9fans@cse.psu.edu
Date: Tue, 17 Aug 2004 13:06:18 -0700
Subject: Fwd: [9fans] accept in dial(2)

I'm indeed only reading 9fans sporadically.

The fd used should indeed be the one returned
by listen.  aux/listen et al are wrong.  However,
since we shut off datakit, it really hasn't mattered
because we currently don't have the ability to reject
IP calls.  Should someone change that, listen et al
should be changed to use nctl.

On Mon, 16 Aug 2004 20:30:48 -0700, geoff@collyer.net <geoff@collyer.net> wrote:
> 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?
>


  parent reply	other threads:[~2004-08-17 21:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-17  3:30 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 [this message]
2004-08-18 17:33   ` rog
2004-08-18 19:18     ` boyd, rounin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee9e417a040817141263a907ce@mail.gmail.com \
    --to=russcox@gmail.com \
    --cc=9fans@cse.psu.edu \
    --cc=presotto@closedmind.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).