mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Change os::timeout from minutes to milliseconds
We can now specify the special value of "-1" milliseconds which is interpreted as disabling the timeout. No change of functionality intended.
This commit is contained in:
parent
0219e63b35
commit
68c7953422
@ -290,7 +290,7 @@ int Systemcall::startscript(Starttype how, string const & what,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!d.waitWhile(SystemcallPrivate::Running, do_events,
|
if (!d.waitWhile(SystemcallPrivate::Running, do_events,
|
||||||
os::timeout_min() * 60 * 1000)) {
|
os::timeout_ms())) {
|
||||||
if (d.state == SystemcallPrivate::Killed) {
|
if (d.state == SystemcallPrivate::Killed) {
|
||||||
LYXERR0("Killed: " << cmd);
|
LYXERR0("Killed: " << cmd);
|
||||||
return KILLED;
|
return KILLED;
|
||||||
|
@ -45,9 +45,11 @@ namespace lyx {
|
|||||||
namespace support {
|
namespace support {
|
||||||
namespace os {
|
namespace os {
|
||||||
|
|
||||||
int timeout_min()
|
int timeout_ms()
|
||||||
{
|
{
|
||||||
return 3;
|
// return -1 to disable the timeout completely.
|
||||||
|
// (-1 is a special case in SystemcallPrivate::waitWhile()).
|
||||||
|
return 3 * 60 * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ std::string current_root();
|
|||||||
///
|
///
|
||||||
shell_type shell();
|
shell_type shell();
|
||||||
|
|
||||||
/// Returns no. of minutes allowed for a command to complete.
|
/// Returns no. of milliseconds allowed for a command to complete.
|
||||||
int timeout_min();
|
int timeout_ms();
|
||||||
|
|
||||||
/// Name of the python interpreter
|
/// Name of the python interpreter
|
||||||
/// @param reset True if the python path should be recomputed
|
/// @param reset True if the python path should be recomputed
|
||||||
|
Loading…
Reference in New Issue
Block a user