fixed a bug with waitpid() - I'd forgotten about WEXITSTATUS !
[rsync/rsync.git] / util.c
diff --git a/util.c b/util.c
index a010165..3cb80eb 100644 (file)
--- 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);
+}