summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/src/nixio.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-02-14 10:42:48 +0000
committerSteven Barth <steven@midlink.org>2009-02-14 10:42:48 +0000
commitaa0cee169fd72fd3c76495e89561598ab723de3c (patch)
treedb8f90eff56639fe514541ad03fc8ba01233f017 /libs/nixio/src/nixio.c
parent5ff898e6248b668430f5f2e7d70de243f191eb04 (diff)
nixio: added sendfile(), return false instead of nil for EWOULDBLOCK
Diffstat (limited to 'libs/nixio/src/nixio.c')
-rw-r--r--libs/nixio/src/nixio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/nixio/src/nixio.c b/libs/nixio/src/nixio.c
index 327f65098e..5f098be31b 100644
--- a/libs/nixio/src/nixio.c
+++ b/libs/nixio/src/nixio.c
@@ -26,7 +26,11 @@
/* pushes nil, error number and errstring on the stack */
int nixio__perror(lua_State *L) {
- lua_pushnil(L);
+ if (errno == EAGAIN) {
+ lua_pushboolean(L, 0);
+ } else {
+ lua_pushnil(L);
+ }
lua_pushinteger(L, errno);
lua_pushstring(L, strerror(errno));
return 3;