+2005-04-21 Angus Leeming <leeming@lyx.org>
+
+ * forkedcontr.C: add #include <csignal>.
+
+ * filetools.C (RunCommand): remove the signal blocking stuff
+ now that we no longer use a signal handler on unix.
+
2005-04-19 Angus Leeming <leeming@lyx.org>
* filetools.C: remove unnecessary #include of forkedcontr.h.
#include <fcntl.h>
#include <cctype>
+#include <cerrno>
#include <cstdlib>
#include <cstdio>
-#include <cerrno>
#include <utility>
#include <fstream>
// pstream (process stream), with the
// variants ipstream, opstream
- sigset_t newMask, oldMask;
- sigemptyset(&oldMask);
- sigemptyset(&newMask);
- sigaddset(&newMask, SIGCHLD);
-
- // Block the SIGCHLD signal.
- sigprocmask(SIG_BLOCK, &newMask, &oldMask);
-
FILE * inf = ::popen(cmd.c_str(), os::popen_read_mode());
// (Claus Hentschel) Check if popen was succesful ;-)
if (pret == -1)
perror("RunCommand:: could not terminate child process");
- // Unblock the SIGCHLD signal and restore the old mask.
- sigprocmask(SIG_SETMASK, &oldMask, 0);
-
return make_pair(pret, ret);
}