diff options
author | aiju <aiju@phicode.de> | 2011-07-13 09:17:47 +0200 |
---|---|---|
committer | aiju <aiju@phicode.de> | 2011-07-13 09:17:47 +0200 |
commit | 34f333404f958f8d93e8f1f582c0a347d2bfd64a (patch) | |
tree | 98a09170f0687959a0d8fb6a86e04f31d87b0655 | |
parent | 0708d34022faefa1124c618cfba3ecb0881bf44d (diff) |
updated bio(2) man page
-rw-r--r-- | sys/man/2/bio | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/man/2/bio b/sys/man/2/bio index 4d8189ebf..075212a6a 100644 --- a/sys/man/2/bio +++ b/sys/man/2/bio @@ -78,6 +78,9 @@ int Bflush(Biobufhdr *bp) .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 @@ returns the number of bytes in the buffer. 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 @@ returns zero if the file cannot be opened in the given mode. 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 |