+ if (rc < 0 && errno == ECHILD) rc = 0; // ignore, it could happens
+ // I know one reason for this is that SICCHLD is set to SIG_IGN but this
+ // should not be the case here. SIGCHLD is explicity set to SIG_DFL
+ // using a sigaction before the call to system(). (Although it is
+ // normally set to SIG_IGN). There should not be any other threads
+ // messing about with SIGCHLD.
+
+ if (rc < 0) {
+ step->setErrorMsg(anna::functions::asString("errno = %d", errno));
+ //std::terminate;
+ }
+ else {
+ rc >>= 8; // divide by 256
+ }
+