git: 9front

Download patch

ref: 8902d79b624f534e90a8f270980a8c2b46efa38d
parent: 64201f2c029193d3a62b876f92dfe6332a281752
author: aiju <aiju@phicode.de>
date: Wed Jul 13 05:17:47 EDT 2011

updated bio(2) man page

--- a/sys/man/2/bio
+++ b/sys/man/2/bio
@@ -78,6 +78,9 @@
 .B
 int	Bbuffered(Biobufhdr *bp)
 .PP
+.B
+void	Blethal(Biobufhdr *bp, void (*errorf)(char *));
+.PP
 .SH DESCRIPTION
 These routines implement fast buffered I/O.
 I/O on different file descriptors is independent.
@@ -311,6 +314,14 @@
 When reading, this is the number of bytes still available from the last
 read on the file; when writing, it is the number of bytes ready to be
 written.
+.PP
+.I Blethal
+arranges
+.I errorf
+to be called in case of an error happening on read/write.
+An argument of
+.B nil
+will have the program terminated in case of error.
 .SH SOURCE
 .B /sys/src/libbio
 .SH SEE ALSO
@@ -330,6 +341,10 @@
 All routines set
 .I errstr
 on error.
+.PP
+An error during read or write will call an error handler specified by
+.IR Blethal ,
+if any.
 .SH BUGS
 .I Brdline
 returns an error on strings longer than the buffer associated
--