Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > d536e3b2143fe88c174c968d683c0f4f > files > 19

conga-0.12.2-24.el5_6.1.src.rpm

diff -up conga-0.12.2/ricci/common/executils.cpp.waitpidfix conga-0.12.2/ricci/common/executils.cpp
--- conga-0.12.2/ricci/common/executils.cpp.waitpidfix	2010-03-17 14:38:38.000000000 -0500
+++ conga-0.12.2/ricci/common/executils.cpp	2010-03-17 14:40:22.000000000 -0500
@@ -188,9 +188,13 @@ sleep(2);
 
 		// wait for events
 		int ret = poll(poll_data, s, 500);
-		if (ret == 0)
+		if (ret == 0) {
+			int status;
+			waitpid(pid, &status, WNOHANG);
+			if (WIFEXITED(status))
+				break;
 			continue;
-		else if (ret == -1) {
+		} else if (ret == -1) {
 			if (errno == EINTR)
 				continue;
 			else {