aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1999-12-09 06:46:11 +0000
committerAndrew Tridgell <tridge@samba.org>1999-12-09 06:46:11 +0000
commitd79d1c69f77dd6cc23a4692f6b8bdd82e181194e (patch)
tree6128c656a0e362084120b60f7ca752f51e87880e /util.c
parenta7d068abffb158d9d805a368a8f4d13da832587d (diff)
downloadandroid_external_rsync-d79d1c69f77dd6cc23a4692f6b8bdd82e181194e.tar.gz
android_external_rsync-d79d1c69f77dd6cc23a4692f6b8bdd82e181194e.tar.bz2
android_external_rsync-d79d1c69f77dd6cc23a4692f6b8bdd82e181194e.zip
fixed a bug with waitpid() - I'd forgotten about WEXITSTATUS !
Diffstat (limited to 'util.c')
-rw-r--r--util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util.c b/util.c
index a0101657..3cb80eb9 100644
--- a/util.c
+++ b/util.c
@@ -870,3 +870,12 @@ char *timestring(time_t t)
return(TimeBuf);
}
+
+/****************************************************************************
+ like waitpid but does the WEXITSTATUS
+****************************************************************************/
+void wait_process(pid_t pid, int *status)
+{
+ waitpid(pid, status, 0);
+ *status = WEXITSTATUS(*status);
+}