9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Ronald G Minnich <rminnich@lanl.gov>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: [9fans] changing close()
Date: Mon, 15 Aug 2005 06:06:45 -0600	[thread overview]
Message-ID: <43008555.4010803@lanl.gov> (raw)


I am wondering about addressing the close() problem, which is that you 
can't close() the send side of a bidi fd without closing the receive 
side too. This has been pointed out as an issue to me w.r.t. TCP sockets 
and such things in which you can't really communicate a zero-byte-write, 
as you could in IL.

BSD hacked around this early (as in 25 years ago) with shutdown(), but
what about having close mode that mirrors open mode:

close(fd) becomes close(fd, ORDWR)

then you can close(fd, OWR) and close(fd, ORD)

Is this a terrible idea? (I'm trying to address the lack of technical 
discussion mentioned  an earlier note :0)

ron






             reply	other threads:[~2005-08-15 12:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-15 12:06 Ronald G Minnich [this message]
2005-08-16  8:07 ` Scott Schwartz
2005-08-16 19:56   ` Charles Forsyth
2005-08-16 23:08   ` Derek Fawcus
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=43008555.4010803@lanl.gov \
    --to=rminnich@lanl.gov \
    --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).