]> git.lyx.org Git - features.git/commitdiff
See r37176. Let's keep this a Windows only "feature".
authorEnrico Forestieri <forenr@lyx.org>
Wed, 4 May 2011 00:17:07 +0000 (00:17 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Wed, 4 May 2011 00:17:07 +0000 (00:17 +0000)
Something went wrong with a script while previewing a document and now
I have to wait for 30 minutes for quitting LyX without killing it.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38578 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/Systemcall.cpp
src/support/os.h
src/support/os_cygwin.cpp
src/support/os_unix.cpp
src/support/os_win32.cpp

index 5713294055d9a9fe0a56977e12c8c98137ac7c3f..8cedb09a339075a8480a15e57aa28f46a34ad1e6 100644 (file)
@@ -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());
index 38517d8bda33d830afe94b20f67c08820dfb5ca4..8d1744bf7e6ee7a3d38bf9963edce61f2bbdbf7f 100644 (file)
@@ -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();
 
index ad97c38bc2a1fd38cb15c860c46b119b6be30111..6f5d57fdaf631f96ff640b03819664d945b71f97 100644 (file)
@@ -381,6 +381,12 @@ shell_type shell()
 }
 
 
+int timeout_min()
+{
+       return 3;
+}
+
+
 char path_separator()
 {
        return ':';
index 20a6316fde0519734ca5a15474722213445ca36a..8727cff2b7412645559e2307098159c8fd14a45f 100644 (file)
@@ -212,6 +212,12 @@ shell_type shell()
 }
 
 
+int timeout_min()
+{
+       return 3;
+}
+
+
 char path_separator()
 {
        return ':';
index dd5f0e594d71cd9fa18fa1adc04dd0710c2d209e..2caf085691278d098fbdcdbe0e54d54c4dc8c842 100644 (file)
@@ -423,6 +423,12 @@ shell_type shell()
 }
 
 
+int timeout_min()
+{
+       return 30;
+}
+
+
 char path_separator()
 {
        return ';';