diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp index 5713294055..8cedb09a33 100644 --- a/src/support/Systemcall.cpp +++ b/src/support/Systemcall.cpp @@ -225,8 +225,8 @@ int Systemcall::startscript(Starttype how, string const & what, bool process_eve return 0; } - int timeout_min = 30; - if (!d.waitWhile(SystemcallPrivate::Running, process_events, timeout_min * 60 * 1000)) { + if (!d.waitWhile(SystemcallPrivate::Running, process_events, + os::timeout_min() * 60 * 1000)) { LYXERR0("Systemcall: '" << cmd << "' did not finish!"); LYXERR0("error " << d.errorMessage()); LYXERR0("status " << d.exitStatusMessage()); diff --git a/src/support/os.h b/src/support/os.h index 38517d8bda..8d1744bf7e 100644 --- a/src/support/os.h +++ b/src/support/os.h @@ -55,6 +55,9 @@ std::string current_root(); /// shell_type shell(); +/// Returns no. of minutes allowed for a command to complete. +int timeout_min(); + /// Name of the python interpreter std::string const python(); diff --git a/src/support/os_cygwin.cpp b/src/support/os_cygwin.cpp index ad97c38bc2..6f5d57fdaf 100644 --- a/src/support/os_cygwin.cpp +++ b/src/support/os_cygwin.cpp @@ -381,6 +381,12 @@ shell_type shell() } +int timeout_min() +{ + return 3; +} + + char path_separator() { return ':'; diff --git a/src/support/os_unix.cpp b/src/support/os_unix.cpp index 20a6316fde..8727cff2b7 100644 --- a/src/support/os_unix.cpp +++ b/src/support/os_unix.cpp @@ -212,6 +212,12 @@ shell_type shell() } +int timeout_min() +{ + return 3; +} + + char path_separator() { return ':'; diff --git a/src/support/os_win32.cpp b/src/support/os_win32.cpp index dd5f0e594d..2caf085691 100644 --- a/src/support/os_win32.cpp +++ b/src/support/os_win32.cpp @@ -423,6 +423,12 @@ shell_type shell() } +int timeout_min() +{ + return 30; +} + + char path_separator() { return ';';