void ForkedProcess::emitSignal()
{
- if (signal_.get()) {
+ if (signal_) {
signal_->operator()(pid_, retval_);
}
}
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