summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/src/nixio.c
diff options
context:
space:
mode:
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 327f65098..5f098be31 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;