Skip to main content

cancel_builds_on_interrupt

Function cancel_builds_on_interrupt 

Source
pub fn cancel_builds_on_interrupt()
Expand description

Makes an interrupt that ends this process while it builds a format dump a cancellation, not a failed build (issue 988): the build’s attempt note goes back to what it held before the build, its partial dump is removed, and the process exits with status 130. The next process builds the format again, where an interrupted build used to count towards marking it failed (.failed.<kind>), so two interrupts left every conversion for a day on the engine’s own definitions. The interrupts are Ctrl+C and, on Unix, SIGTERM and SIGHUP (on Windows, Ctrl+Break and closing the console). For a front end its user interrupts (the latexml_oxide CLI’s conversions); an embedder that handles signals itself leaves it off. The handler is installed when the process starts its first build, so a process that builds nothing keeps its default interrupt. One that builds keeps the handler to its end: a later SIGTERM or SIGHUP ends it with status 130, not by the signal, since neither ctrlc nor a safe signal/sigaction can put the default action back. A process that ignores or handles any of these signals already (nohup, a shell’s background job) keeps them as they are, and an interrupted build there counts as before.