You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when halmos is waiting on a solver and we type ctrl+c, we don't want the current solver to get the signal, we want halmos to get the signal and interrupt the run cleanly (killing already spawned solvers).
Something like this:
importosimportsubprocessimportsysimportatexit# Create process with different flags based on platformifos.name=='nt': # Windowsproc=subprocess.Popen(
["jsi", "--full-run", "examples/unsat_div.smt2"],
creationflags=subprocess.CREATE_NEW_PROCESS_GROUP
)
else: # Unix-likeos.setpgrp()
proc=subprocess.Popen(
["jsi", "--full-run", "examples/unsat_div.smt2"],
preexec_fn=os.setpgrp,
start_new_session=True
)
print(f"started {proc.pid=}")
atexit.register(lambda: proc.kill())
sys.exit(42)
Explanation: all processes in the foreground process group of the current session receive the signal, so we want the external solvers to run in a different session and process group, in order to make sure that halmos itself orchestrates external processes correctly.
The text was updated successfully, but these errors were encountered:
when halmos is waiting on a solver and we type ctrl+c, we don't want the current solver to get the signal, we want halmos to get the signal and interrupt the run cleanly (killing already spawned solvers).
Something like this:
Explanation: all processes in the foreground process group of the current session receive the signal, so we want the external solvers to run in a different session and process group, in order to make sure that halmos itself orchestrates external processes correctly.
The text was updated successfully, but these errors were encountered: