Correct a bug introduced in r415 where cfpopen wouldn't properly wait for
children, causing MAXFD errors.
Index: cfengine-trunk/src/popen.c
===================================================================
--- cfengine-trunk.orig/src/popen.c
+++ cfengine-trunk/src/popen.c
@@ -659,13 +659,13 @@ if (fd >= MAXFD)
return -1;
}
-CHILD[fd] = 0;
-
if ((pid = CHILD[fd]) == 0)
{
return -1;
}
+CHILD[fd] = 0;
+
if (fclose(pp) == EOF)
{
return -1;
--
Eric Searcy
OSU Open Source Lab
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine