]> Repositorios git - scryer-prolog.git/commitdiff
treat LocalCodePtr::Halt received at lookup_local_instr as an interrupt (#823)
authorMark Thom <[email protected]>
Fri, 19 Feb 2021 20:44:22 +0000 (13:44 -0700)
committerMark Thom <[email protected]>
Fri, 19 Feb 2021 20:44:22 +0000 (13:44 -0700)
src/machine/code_repo.rs

index 092f6407e80672c2799297786b064c1f9da61b14..7db42530e2a8c53b28003bd6ad36e0c399acc773 100644 (file)
@@ -24,7 +24,8 @@ impl CodeRepo {
     ) -> RefOrOwned<'a, Line> {
         match p {
             LocalCodePtr::Halt => {
-                unreachable!()
+                // exit with the interrupt exit code.
+                std::process::exit(1);
             }
             LocalCodePtr::DirEntry(p) => {
                 RefOrOwned::Borrowed(&self.code[p as usize])