--- a/src/Pure/Admin/build_doc.scala Thu Nov 12 16:07:25 2020 +0100
+++ b/src/Pure/Admin/build_doc.scala Thu Nov 12 16:27:31 2020 +0100
@@ -50,7 +50,6 @@
val errs =
Par_List.map((doc_session: (String, String)) =>
try {
- progress.expose_interrupt()
Present.build_documents(doc_session._2, deps, store, progress = progress)
None
}
--- a/src/Pure/System/progress.scala Thu Nov 12 16:07:25 2020 +0100
+++ b/src/Pure/System/progress.scala Thu Nov 12 16:27:31 2020 +0100
@@ -54,12 +54,16 @@
env: Map[String, String] = Isabelle_System.settings(),
redirect: Boolean = false,
echo: Boolean = false,
+ watchdog: Time = Time.zero,
strict: Boolean = true): Process_Result =
{
- Isabelle_System.bash(script, cwd = cwd, env = env, redirect = redirect,
- progress_stdout = echo_if(echo, _),
- progress_stderr = echo_if(echo, _),
- strict = strict)
+ val result =
+ Isabelle_System.bash(script, cwd = cwd, env = env, redirect = redirect,
+ progress_stdout = echo_if(echo, _),
+ progress_stderr = echo_if(echo, _),
+ watchdog = if (watchdog.is_zero) None else Some((watchdog, _ => stopped)),
+ strict = strict)
+ if (strict && stopped) throw Exn.Interrupt() else result
}
}
--- a/src/Pure/Thy/present.scala Thu Nov 12 16:07:25 2020 +0100
+++ b/src/Pure/Thy/present.scala Thu Nov 12 16:27:31 2020 +0100
@@ -278,7 +278,8 @@
"isabelle latex -o " + Bash.string(fmt) + " " + Bash.string(root + "." + ext)
def bash(items: String*): Process_Result =
- progress.bash(items.mkString(" && "), cwd = doc_dir.file, echo = verbose_latex)
+ progress.bash(items.mkString(" && "), cwd = doc_dir.file,
+ echo = verbose_latex, watchdog = Time.seconds(0.5))
// prepare document