9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Bread + note -> loss
@ 2014-05-12 15:10 erik quanstrom
  2014-05-12 16:18 ` cinap_lenrek
  0 siblings, 1 reply; 8+ messages in thread
From: erik quanstrom @ 2014-05-12 15:10 UTC (permalink / raw)
  To: 9fans

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



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

end of thread, other threads:[~2014-05-16 19:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-12 15:10 [9fans] Bread + note -> loss erik quanstrom
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

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