Skip to content

Commit 2444961

Browse files
committed
Correct exitcode of KeyboardInterrupt
1 parent b6c9882 commit 2444961

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vm/src/vm/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,9 @@ impl VirtualMachine {
757757
writeln!(stderr, "{msg}");
758758
}
759759
1
760+
} else if cfg!(unix) && exc.fast_isinstance(self.ctx.exceptions.keyboard_interrupt) {
761+
self.print_exception(exc);
762+
(libc::SIGINT as u8) + 128u8
760763
} else {
761764
self.print_exception(exc);
762765
1

0 commit comments

Comments
 (0)