]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_utilities/lib/unixchild.cpp
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_utilities / lib / unixchild.cpp
index 9e1c9f7547cf7ebd078af71bfe384232dbd964cc..b6369d5cc633a437582f9597f41a0bec57bb32ac 100644 (file)
@@ -42,6 +42,7 @@
 #include <security_utilities/debugging.h>
 #include <signal.h>
 
+#include <sstream>
 
 namespace Security {
 namespace UnixPlusPlus {
@@ -371,7 +372,7 @@ bool Child::checkStatus(int options)
        secinfo("unixchild", "checking %p (pid %d)", this, this->pid());
        int status;
   again:
-       switch (IFDEBUG(pid_t pid =) ::wait4(this->pid(), &status, options, NULL)) {
+       switch (pid_t pid = ::wait4(this->pid(), &status, options, NULL)) {
        case pid_t(-1):
                switch (errno) {
                case EINTR:
@@ -420,7 +421,9 @@ void Child::checkChildren()
                } else if (!mChildren().empty()) {
                        int status;
                        while (pid_t pid = ::wait4(0, &status, WNOHANG, NULL)) {
-                               secinfo("unixchild", "universal child check (%ld children known alive)", mChildren().size());
+                               ostringstream os;
+                               os << "universal child check (" << mChildren().size() << " children known alive)";
+                               secinfo("unixchild", "%s", os.str().c_str());
                                switch (pid) {
                                case pid_t(-1):
                                        switch (errno) {