aboutsummaryrefslogtreecommitdiff
path: root/termkey_advisereadable.3
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-01-18 10:36:50 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-01-18 10:36:50 +0000
commitd64ba87edae62894ca74cfb9d6d8cdd88c213397 (patch)
treefab0f0af85d94b40240c881994f18b52f4130bc3 /termkey_advisereadable.3
parent3474a45b14a131e92e52960dd90e63c12fda275d (diff)
downloadtermo-d64ba87edae62894ca74cfb9d6d8cdd88c213397.tar.gz
termo-d64ba87edae62894ca74cfb9d6d8cdd88c213397.tar.xz
termo-d64ba87edae62894ca74cfb9d6d8cdd88c213397.zip
Ensure that termkey_advisereadable() just fails with errno=ENOMEM rather than trying to read() zero bytes
Diffstat (limited to 'termkey_advisereadable.3')
-rw-r--r--termkey_advisereadable.32
1 files changed, 1 insertions, 1 deletions
diff --git a/termkey_advisereadable.3 b/termkey_advisereadable.3
index fe70125..06e0467 100644
--- a/termkey_advisereadable.3
+++ b/termkey_advisereadable.3
@@ -10,7 +10,7 @@ termkey_advisereadable \- read more bytes from the underlying terminal
.sp
Link with \fI-ltermkey\fP.
.SH DESCRIPTION
-\fBtermkey_advisereadable\fP() informs the instance that new input may be available on the underlying file descriptor and so it should call \fBread\fP(2) to obtain it. If at least one more byte was read it will return \fBTERMKEY_RES_AGAIN\fP to indicate it may be useful to call \fBtermkey_getkey\fP(3) again. If no more input was read then \fBTERMKEY_RES_NONE\fP is returned.
+\fBtermkey_advisereadable\fP() informs the instance that new input may be available on the underlying file descriptor and so it should call \fBread\fP(2) to obtain it. If at least one more byte was read it will return \fBTERMKEY_RES_AGAIN\fP to indicate it may be useful to call \fBtermkey_getkey\fP(3) again. If no more input was read then \fBTERMKEY_RES_NONE\fP is returned. If there was no buffer space remaining, then \fBTERMKEY_RES_ERROR\fP is returned with \fIerrno\fP set to \fBENOMEM\fP.
.PP
This function, along with \fBtermkey_getkey\fP(3) make it possible to use the termkey instance in an asynchronous program.
.PP