9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Miller <miller@hamnavoe.demon.co.uk>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] threads in Plan 9
Date: Sat, 28 Apr 2001 17:00:01 +0100	[thread overview]
Message-ID: <E14taY1-0005ZP-0K@tele-post-20.mail.demon.net> (raw)

> I used to have great fun with mothra when one process would crash, and
> leave the rest deadlocked or otherwise boggled.

This behaviour seems to be a consequence of the atnotify handler
in the event(2) package used by mothra.

When a note is received in the main process, the handler sends a "die" note
to all the subprocesses and returns 0 to request the default exception
action (exit or suspend).  But when a note is received in a subprocess, the
handler simply returns 1 to request continuation.  If the note occurred
during a system call (e.g. reading from the network), in most cases the
continued mothra process will detect the abnormal return and exit.  If not,
the "die" note is simply ignored and deadlock results.

I wonder whether /sys/src/libdraw/event.c:#6972,#6980 should be "return 0" ?

-- Richard



             reply	other threads:[~2001-04-28 16:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-28 16:00 Richard Miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-04-27 21:39 forsyth
2001-04-30  9:24 ` Douglas A. Gwyn
2001-04-27 20:06 jmk
2001-04-27 19:09 [9fans] Awk or Limbo ? geoff.9fans
2001-04-27 19:23 ` [9fans] threads in Plan 9 Scott Schwartz

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=E14taY1-0005ZP-0K@tele-post-20.mail.demon.net \
    --to=miller@hamnavoe.demon.co.uk \
    --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).