From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 12 May 2014 11:10:06 -0400 To: 9fans@9fans.net Message-ID: <898499510426814c02cf09e22c612bc5@ladd.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] Bread + note -> loss Topicbox-Message-UUID: e5805e46-ead8-11e9-9d60-3106f5b1d025 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