]> git.lyx.org Git - lyx.git/blobdiff - src/support/ForkedCalls.cpp
File missing in the tarball
[lyx.git] / src / support / ForkedCalls.cpp
index 0768652cfb744d2a4a27b1d9ea41e7705bbd7519..fb9dd608f8903ba0245b47f71d6d7b39fb66742e 100644 (file)
@@ -21,7 +21,7 @@
 #include "support/os.h"
 #include "support/Timeout.h"
 
-#include <boost/bind.hpp>
+#include "support/bind.h"
 
 #include <cerrno>
 #include <queue>
@@ -46,7 +46,7 @@
 
 using namespace std;
 
-using boost::bind;
+
 
 namespace lyx {
 namespace support {
@@ -84,7 +84,7 @@ private:
        Murder(int secs, pid_t pid)
                : timeout_(1000*secs, Timeout::ONETIME), pid_(pid)
        {
-               timeout_.timeout.connect(boost::bind(&Murder::kill, this));
+               timeout_.timeout.connect(bind(&Murder::kill, this));
                timeout_.start();
        }
 
@@ -150,7 +150,7 @@ int ForkedProcess::run(Starttype type)
 
 bool ForkedProcess::running() const
 {
-       if (!pid())
+       if (pid() <= 0)
                return false;
 
 #if !defined (_WIN32)
@@ -170,7 +170,7 @@ bool ForkedProcess::running() const
 void ForkedProcess::kill(int tol)
 {
        lyxerr << "ForkedProcess::kill(" << tol << ')' << endl;
-       if (pid() == 0) {
+       if (pid() <= 0) {
                lyxerr << "Can't kill non-existent process!" << endl;
                return;
        }
@@ -442,10 +442,10 @@ void callNext()
        Process pro = callQueue_.front();
        callQueue_.pop();
        // Bind our chain caller
-       pro.second->connect(boost::bind(&ForkedCallQueue::callback, _1, _2));
+       pro.second->connect(bind(&ForkedCallQueue::callback, _1, _2));
        ForkedCall call;
-       // If we fail to fork the process, then emit the signal
-       // to tell the outside world that it failed.
+       //If we fail to fork the process, then emit the signal
+       //to tell the outside world that it failed.
        if (call.startScript(pro.first, pro.second) > 0)
                pro.second->operator()(0,1);
 }
@@ -520,7 +520,7 @@ string const getChildErrorMessage()
 
 namespace ForkedCallsController {
 
-typedef boost::shared_ptr<ForkedProcess> ForkedProcessPtr;
+typedef shared_ptr<ForkedProcess> ForkedProcessPtr;
 typedef list<ForkedProcessPtr> ListType;
 typedef ListType::iterator iterator;