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;
}
// Bind our chain caller
pro.second->connect(boost::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);
}