9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Mechiel Lukkien <mechiel@xs4all.nl>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] i/o on a hangup channel asymmetry
Date: Sun, 19 Jul 2009 23:11:56 +0200	[thread overview]
Message-ID: <20090719211156.GH8655@knaagkever.ueber.net> (raw)
In-Reply-To: <cb9353c73dbc7bf00968d179b5f51372@terzarima.net>

On Sun, Jul 19, 2009 at 10:30:41AM +0100, Charles Forsyth wrote:
> >perhaps i've been asleep at the swtch, but i don't recall seing writes
> >on closed channels terminate programs with a note.
>
> sys: write on closed pipe
>
> mainly to kill off a pipeline when the thing at the end has finished.
> i think that might be the only instance where a note is used.

not for network connections?  that's what happens on unix at least, eg:

	A SIGPIPE signal is raised if a process sends on a broken stream;
	this causes naive processes, which do not handle the signal,
	to exit.

and because of that, on hosted inferno an exception is raised on sigpipe.
with the light use of threads, which are sometimes used to respond on a
limbo channel after completion of a job, that can be tricky (if you're
not aware of it;  i usually forget to consider the case).

mjl



  parent reply	other threads:[~2009-07-19 21:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-18 18:39 Roman V. Shaposhnik
2009-07-19  1:06 ` erik quanstrom
2009-07-19  9:30   ` Charles Forsyth
2009-07-19 20:32     ` Roman Shaposhnik
2009-07-19 21:01       ` Francisco J Ballesteros
2009-07-20  4:49         ` Roman Shaposhnik
2009-07-20  9:53           ` Charles Forsyth
2009-07-20 17:01             ` Roman V Shaposhnik
2009-07-20 18:38               ` Charles Forsyth
2009-07-19 21:11     ` Mechiel Lukkien [this message]
2009-07-19 21:55       ` Charles Forsyth
2009-07-20  4:52         ` Roman Shaposhnik
2009-07-20  5:21           ` erik quanstrom
2009-07-20 16:53             ` Roman V Shaposhnik
2009-07-21  1:01               ` erik quanstrom
2009-07-21  2:04                 ` Russ Cox
2009-07-21  2:15                   ` erik quanstrom
2009-07-23 12:15                     ` roger peppe
2009-07-20  9:52           ` Charles Forsyth
2009-07-20 17:14             ` Roman V Shaposhnik
2009-07-19 20:06   ` Roman Shaposhnik
2009-07-19 20:22     ` erik quanstrom

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=20090719211156.GH8655@knaagkever.ueber.net \
    --to=mechiel@xs4all.nl \
    --cc=9fans@9fans.net \
    /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).