9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Derek Fawcus <dfawcus@cisco.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] changing close()
Date: Wed, 17 Aug 2005 00:08:26 +0100	[thread overview]
Message-ID: <20050817000826.B17788@mrwint.cisco.com> (raw)
In-Reply-To: <20050816080704.1012.qmail@g.galapagos.bx.psu.edu>; from schwartz@bio.cse.psu.edu on Tue, Aug 16, 2005 at 04:07:04AM -0400

On Tue, Aug 16, 2005 at 04:07:04AM -0400, Scott Schwartz wrote:
> | Is this a terrible idea? (I'm trying to address the lack of technical 
> | discussion mentioned  an earlier note :0)
> 
> In my humble opinion, the better solution is to have dial return
> a pair of descriptors (and change the rest of the system to have
> e.g. /net/tcp/9/data{0,1}), so you can close the one you want.
> 
> But maybe it's too late for that, and changing close is the only way.

I fancied having a 'split' call that would act a bit like a collision
between dup and pipe;  it would return 2 fds - a read only and a write
only.   So one could then do:

int bidir_fd;
int unidir_fds[2];

split(bidir_fd, unidir_fds);
close(bidir_fd);

/* Use unidir_fd[0] and unidir_fd[1] */

DF


  parent reply	other threads:[~2005-08-16 23:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-15 12:06 Ronald G Minnich
2005-08-16  8:07 ` Scott Schwartz
2005-08-16 19:56   ` Charles Forsyth
2005-08-16 23:08   ` Derek Fawcus [this message]
2005-08-16  8:58 ` Charles Forsyth
2005-08-16 17:19   ` Brantley Coile
2005-08-21 20:17 ` Russ Cox
2005-08-23  8:28   ` Ronald G Minnich
2005-08-23 16:19     ` Charles Forsyth
2005-08-23  9:03       ` Ronald G Minnich
2005-08-23 16:54         ` Charles Forsyth
2005-08-27  8:02       ` kokamoto
2005-08-27  8:26         ` kokamoto

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=20050817000826.B17788@mrwint.cisco.com \
    --to=dfawcus@cisco.com \
    --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).