#include "support/os.h"
#include "support/Timeout.h"
-#include <boost/bind.hpp>
+#include "support/bind.h"
#include <cerrno>
#include <queue>
using namespace std;
-using boost::bind;
+
namespace lyx {
namespace support {
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();
}
bool ForkedProcess::running() const
{
- if (!pid())
+ if (pid() <= 0)
return false;
#if !defined (_WIN32)
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;
}
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);
}
namespace ForkedCallsController {
-typedef boost::shared_ptr<ForkedProcess> ForkedProcessPtr;
+typedef shared_ptr<ForkedProcess> ForkedProcessPtr;
typedef list<ForkedProcessPtr> ListType;
typedef ListType::iterator iterator;