9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Fco.J.Ballesteros <nemo@plan9.escet.urjc.es>
To: 9fans@cse.psu.edu
Subject: [9fans] change for libthread/ioproc.c
Date: Fri, 24 Jan 2003 11:15:35 +0100	[thread overview]
Message-ID: <973150fb54396b0515b31083d9e456c3@plan9.escet.urjc.es> (raw)

Hi,

	when you create an ioproc and later interrupt it with iointerrupt,
(since there's no handler set) the xioproc process dies. This means that
the process performing the iocall hangs forever waiting in the receive from
the ioproc channel.

I think that xioproc() could add this near its begin:

	threadnotify(ionoted, 1);

with

	static int
	ionoted(void*, char* n)
	{
		return (strcmp(n, "interrupt") == 0);
	}


The result is that iointerrupt interrupts the current io operation which then
returns -1 with the `interrupted' status.

If there's anything else I'm missing and the current code should work
correctly I'd be happy to know it (I already changed our libthread).

hth



             reply	other threads:[~2003-01-24 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-24 10:15 Fco.J.Ballesteros [this message]
2003-01-28 21:24 ` David Gordon Hogan

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=973150fb54396b0515b31083d9e456c3@plan9.escet.urjc.es \
    --to=nemo@plan9.escet.urjc.es \
    --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).