aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-05-15 23:23:23 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-05-15 23:23:23 +0200
commit071ede1e5de784820f39c2546000c08d74b12f6d (patch)
tree4ff68f19cafbcf5acbd67691bd80c3014d1ecdff /include/libbb.h
parentc15f40c3e7bfeae1b616c53a574308c2df707b3d (diff)
downloadbusybox-071ede1e5de784820f39c2546000c08d74b12f6d.tar.gz
xmalloc_[open_]read[_close]: do not ignore xrealloc return value
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 128aa9207..bae7efb00 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -965,6 +965,12 @@ enum {
/* How long the longest ESC sequence we know? */
KEYCODE_BUFFER_SIZE = 4
};
+/* Note: fd may be in blocking or non-blocking mode, both make sense.
+ * For one, less uses non-blocking mode.
+ * Only the first read syscall inside read_key may block indefinitely
+ * (unless fd is in non-blocking mode),
+ * subsequent reads will time out after a few milliseconds.
+ */
int read_key(int fd, smalluint *nbuffered, char *buffer) FAST_FUNC;