#include <unistd.h>
#include <pthread.h>
#include <signal.h>
+#include <sys/types.h>
#ifdef HAVE_STD_STRINGSTREAM
# include <sstream>
// int ret = std::system (command);
int ret = kill (master_pid, 0);
if (ret != 0)
- if (ret == ESRCH)
+ if ((ret == -1) && (errno == ESRCH))
die ("Master process seems to have died!");
else
- die ("Unspecified error while checking for other process!");
+ die ("Unspecified error while checking for other process!", ret, errno);
// ok, master still running,
// take a little rest and then
#endif
#include <sys/wait.h>
+#include <sys/types.h>
+#include <signal.h>
#include <unistd.h>
#ifndef DEAL_II_USE_DIRECT_ERRNO_H
// die ("Child process seems to have died!");
int ret = kill (child_pid, 0);
if (ret != 0)
- if (ret == ESRCH)
+ if ((ret == -1) && (errno == ESRCH))
die ("Child process seems to have died!");
else
- die ("Unspecified error while checking for other process!");
+ die ("Unspecified error while checking for other process!", ret, errno);
// ok, master still running,
// take a little rest and then
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams