#include "AliChildProcTerminator.h"
#include <sys/wait.h>
+#include <signal.h>
//______________________________________________________________________________
// Full description of AliChildProcTerminator
sac.sa_handler = sig_handler;
sigemptyset(&sac.sa_mask);
sac.sa_flags = 0;
+
+ // The sa_restorer field is Not POSIX and obsolete.
+ // This is for compilation on other systems
+#if defined(__linux) && \
+ (defined(__i386__) || defined(__x86_64__)) && \
+ defined(__GNUC__)
+ sac.sa_restorer= NULL;
+#endif
+
sigaction(SIGCHLD, &sac, 0);
}
void AliChildProcTerminator::ChildProcTerm(Int_t pid, Int_t status)
{
+ if (pid < 0) return;
+
Long_t args[2];
args[0] = (Long_t) pid;
args[1] = (Long_t) status;