9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Alexander Viro <viro@math.psu.edu>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Potential race in syspipe()
Date: Mon, 14 Aug 2000 00:50:44 -0400	[thread overview]
Message-ID: <Pine.GSO.4.10.10008140035390.194-100000@weyl.math.psu.edu> (raw)
In-Reply-To: <200008140430.AAA01256@cse.psu.edu>



On Mon, 14 Aug 2000 presotto@plan9.bell-labs.com wrote:

> magic in one place.  I noticed your snippet didn't check the
> need to growfd after getting i, perhaps a good reason for
> findfreefd().

	Didn't have to, actually - if the first for() would reach the end
of array we would have i==f->nfd and the second for() would immediately
terminate with j==f->nfd+1. After that we would get the right call of
growfd() and correct values at once.

	But yes, findfreefd() makes the things more obviously correct.

[snip]

> As for create(), I'ld rather change the man page.  Otherwise we'ld
> have to reserve an fd in some way before the open but not have that
> fd visible to other processes until it was assinged a channel
> or let it be step on-able by dup2...

<nods>

							Al



  reply	other threads:[~2000-08-14  4:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-14  4:30 presotto
2000-08-14  4:50 ` Alexander Viro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-08-14  1:47 presotto
2000-08-14  2:42 ` Alexander Viro
2000-08-15 19:42   ` Dan Cross
2000-08-16 11:58     ` Alexander Viro
2000-08-16 12:36       ` Boyd Roberts
2000-08-11 11:20 Alexander Viro

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=Pine.GSO.4.10.10008140035390.194-100000@weyl.math.psu.edu \
    --to=viro@math.psu.edu \
    --cc=9fans@cse.psu.edu \
    /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).