From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: [9fans] Bread + note -> loss
Date: Mon, 12 May 2014 11:10:06 -0400 [thread overview]
Message-ID: <898499510426814c02cf09e22c612bc5@ladd.quanstro.net> (raw)
in looking at a particular situation with Bread, i noticed that it
Bgetc, and Bgetrune differ from Brdstr in what it does with read
returns a count <= 0. Brdstr just returns nil. Bread sets Binactive.
this wouldn't matter if there were not two fundamentally different
types of notes: alarms and everything else. (from this perspective
it seems a shame that plan 9 doesn't allow syscalls to be restarted.)
for the interrupted case, this Bread with a different, undocumented,
(and bizarre) recovery strategy. a Bseek(b, 0, 1) will rejuvinate the
Biobuf for Bread, but one must carefully paste the interrupted slop
together with a second response if one wishes to recover from an
interrupted read.
so, boo. this seems like a real painful corner case. and i don't see
any easy way out, unless bio were modified to allow read and write
to be replaced with indirect function calls. this might be very interesting
for threaded applications.
crazy?
- erik
next reply other threads:[~2014-05-12 15:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 15:10 erik quanstrom [this message]
2014-05-12 16:18 ` cinap_lenrek
2014-05-12 16:21 ` erik quanstrom
2014-05-12 16:31 ` erik quanstrom
2014-05-12 16:41 ` cinap_lenrek
2014-05-14 16:59 ` erik quanstrom
2014-05-16 19:24 ` cinap_lenrek
2014-05-16 19:29 ` 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=898499510426814c02cf09e22c612bc5@ladd.quanstro.net \
--to=quanstro@quanstro.net \
--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).