9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] changing close()
@ 2005-08-15 12:06 Ronald G Minnich
  2005-08-16  8:07 ` Scott Schwartz
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Ronald G Minnich @ 2005-08-15 12:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


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






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

end of thread, other threads:[~2005-08-27  8:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-15 12:06 [9fans] changing close() Ronald G Minnich
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

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).