using namespace std;
-
namespace lyx {
namespace support {
//
/////////////////////////////////////////////////////////////////////
-class Murder : public boost::signals::trackable {
+class Murder : public boost::signals2::trackable {
public:
//
static void killItDead(int secs, pid_t pid)
//
/////////////////////////////////////////////////////////////////////
-ForkedCall::ForkedCall(string const & path)
- : cmd_prefix_(to_filesystem8bit(from_utf8(latexEnvCmdPrefix(path))))
+ForkedCall::ForkedCall(string const & path, string const & lpath)
+ : cmd_prefix_(to_filesystem8bit(from_utf8(latexEnvCmdPrefix(path, lpath))))
{}
return retval_;
}
- command_ = trim(what);
+ command_ = commandPrep(trim(what));
signal_.reset();
return run(Wait);
}
int ForkedCall::startScript(string const & what, SignalTypePtr signal)
{
- command_ = trim(what);
+ command_ = commandPrep(trim(what));
signal_ = signal;
return run(DontWait);
if (command_.empty())
return 1;
- string const line = cmd_prefix_ + command_;
+ // Make sure that a V2 python is run, if available.
+ string const line = cmd_prefix_ +
+ (prefixIs(command_, "python -tt")
+ ? os::python() + command_.substr(10) : command_);
#if !defined (_WIN32)
// POSIX
vector<char *>::iterator ait = argv.begin();
vector<char *>::iterator const aend = argv.end();
lyxerr << "<command>\n\t" << line
- << "\n\tInterpretted as:\n\n";
+ << "\n\tInterpreted as:\n\n";
for (; ait != aend; ++ait)
if (*ait)
lyxerr << '\t'<< *ait << '\n';
Process pro = callQueue_.front();
callQueue_.pop();
// Bind our chain caller
- pro.second->connect(lyx::bind(&ForkedCallQueue::callback, _1, _2));
+ pro.second->connect(callback);
ForkedCall call;
//If we fail to fork the process, then emit the signal
//to tell the outside world that it failed.