We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0874d1e commit a18d516Copy full SHA for a18d516
src/minizinc/instance.py
@@ -452,7 +452,12 @@ async def solutions(
452
# Process was cancelled by the user, a MiniZincError occurred, or
453
# an unexpected Python exception occurred
454
# First, terminate the process
455
- proc.terminate()
+ if sys.platform == "win32":
456
+ import signal
457
+
458
+ proc.send_signal(signal.CTRL_C_EVENT)
459
+ else:
460
+ proc.terminate()
461
_ = await proc.wait()
462
# Then, reraise the error that occurred
463
raise
0 commit comments