]> git.lyx.org Git - features.git/commitdiff
Enable compilation on various platforms.
authorAngus Leeming <leeming@lyx.org>
Thu, 21 Apr 2005 14:03:30 +0000 (14:03 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 21 Apr 2005 14:03:30 +0000 (14:03 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9849 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/ChangeLog
src/support/filetools.C
src/support/forkedcontr.C

index 6279bd1afd51249c8ce12e0407844f9212659310..462269bfc57bda7b082e643572129db57087dfe7 100644 (file)
@@ -1,3 +1,10 @@
+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.
index 3cc0880f67f62c1feb139b1905439c1717110ad2..6bdc9336abe4304399a92cb98ff425148ed8a901 100644 (file)
@@ -43,9 +43,9 @@
 #include <fcntl.h>
 
 #include <cctype>
+#include <cerrno>
 #include <cstdlib>
 #include <cstdio>
-#include <cerrno>
 
 #include <utility>
 #include <fstream>
@@ -1061,14 +1061,6 @@ cmd_ret const RunCommand(string const & cmd)
        // 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 ;-)
@@ -1087,9 +1079,6 @@ cmd_ret const RunCommand(string const & cmd)
        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);
 }
 
index 0a16b76d0529ba265d15339ccf6a67fe51e259f3..3dd158c3b33e30ef12bca66c034a4e37d08f2189 100644 (file)
@@ -25,6 +25,7 @@
 
 #else
 # include <cerrno>
+# include <csignal>
 # include <cstdlib>
 # include <unistd.h>
 # include <sys/wait.h>