Author: forenr
Date: Wed May 4 02:17:07 2011
New Revision: 38578
URL: http://www.lyx.org/trac/changeset/38578
Log:
See r37176. Let's keep this a Windows only "feature".
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.
Modified:
lyx-devel/trunk/src/support/Systemcall.cpp
lyx-devel/trunk/src/support/os.h
lyx-devel/trunk/src/support/os_cygwin.cpp
lyx-devel/trunk/src/support/os_unix.cpp
lyx-devel/trunk/src/support/os_win32.cpp
Modified: lyx-devel/trunk/src/support/Systemcall.cpp
==============================================================================
--- lyx-devel/trunk/src/support/Systemcall.cpp Wed May 4 02:05:39 2011
(r38577)
+++ lyx-devel/trunk/src/support/Systemcall.cpp Wed May 4 02:17:07 2011
(r38578)
@@ -225,8 +225,8 @@
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());
Modified: lyx-devel/trunk/src/support/os.h
==============================================================================
--- lyx-devel/trunk/src/support/os.h Wed May 4 02:05:39 2011 (r38577)
+++ lyx-devel/trunk/src/support/os.h Wed May 4 02:17:07 2011 (r38578)
@@ -55,6 +55,9 @@
///
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();
Modified: lyx-devel/trunk/src/support/os_cygwin.cpp
==============================================================================
--- lyx-devel/trunk/src/support/os_cygwin.cpp Wed May 4 02:05:39 2011
(r38577)
+++ lyx-devel/trunk/src/support/os_cygwin.cpp Wed May 4 02:17:07 2011
(r38578)
@@ -381,6 +381,12 @@
}
+int timeout_min()
+{
+ return 3;
+}
+
+
char path_separator()
{
return ':';
Modified: lyx-devel/trunk/src/support/os_unix.cpp
==============================================================================
--- lyx-devel/trunk/src/support/os_unix.cpp Wed May 4 02:05:39 2011
(r38577)
+++ lyx-devel/trunk/src/support/os_unix.cpp Wed May 4 02:17:07 2011
(r38578)
@@ -212,6 +212,12 @@
}
+int timeout_min()
+{
+ return 3;
+}
+
+
char path_separator()
{
return ':';
Modified: lyx-devel/trunk/src/support/os_win32.cpp
==============================================================================
--- lyx-devel/trunk/src/support/os_win32.cpp Wed May 4 02:05:39 2011
(r38577)
+++ lyx-devel/trunk/src/support/os_win32.cpp Wed May 4 02:17:07 2011
(r38578)
@@ -423,6 +423,12 @@
}
+int timeout_min()
+{
+ return 30;
+}
+
+
char path_separator()
{
return ';';