summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-03-09 20:06:36 +0000
committerSteven Barth <steven@midlink.org>2009-03-09 20:06:36 +0000
commit2e79c969c03cba4ecdb35ea71fd31613e85fb7ff (patch)
tree0615ca54662f9468c799fbbc137fcb844b290996 /libs/nixio
parent7b5d67305eb6e33d2fa8aac79fa4ce922cca6a12 (diff)
httpclient: Added missing import
nixio: waitpid() returns 0 with WNOHANG and no terminated childs
Diffstat (limited to 'libs/nixio')
-rw-r--r--libs/nixio/src/process.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/nixio/src/process.c b/libs/nixio/src/process.c
index e8f0cdc50..69f19b7ac 100644
--- a/libs/nixio/src/process.c
+++ b/libs/nixio/src/process.c
@@ -59,7 +59,10 @@ static int nixio_wait(lua_State *L) {
pidout = waitpid(pidin, &status, options);
} while (pidout == -1 && errno == EINTR);
- if (pidout == -1) {
+ if (pidout == 0) {
+ lua_pushboolean(L, 0);
+ return 1;
+ } else if (pidout == -1) {
return nixio__perror(L);
} else {
lua_pushinteger(L, pidout);