Skip to content

Commit 044eec8

Browse files
committed
fix: signed int
1 parent 1fed80e commit 044eec8

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/ezmsg/core/backend.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,15 @@ def _shutdown_was_unclean(self) -> bool:
464464
def _exit_with_sigint(self) -> None:
465465
code = 0xC000013A if os.name == "nt" else 130
466466
if os.name == "nt":
467-
os._exit(code)
467+
try:
468+
import ctypes
469+
except Exception:
470+
os._exit(1)
471+
try:
472+
ctypes.windll.kernel32.ExitProcess(ctypes.c_uint(code).value)
473+
except Exception:
474+
os._exit(ctypes.c_int32(code).value)
475+
return
468476

469477
prev_handler = None
470478
try:

0 commit comments

Comments
 (0)