trio icon indicating copy to clipboard operation
trio copied to clipboard

In run_process, what should happen if the deliver_cancel function raises an exception?

Open njsmith opened this issue 4 years ago • 7 comments

What should happen if deliver_cancel raises an exception? In the current implementation, the shielded cancel scope will prevent it from propagating until the process exits, which might take a while if the crash occurred before signaling the process in any way. Maybe on exception from a user-specified deliver_cancel we should call the default deliver_cancel to kill the process? Or just kill() since we don't care much about polish at that point, only about letting the user know what they need to fix.

Originally posted by @oremanj in https://github.com/python-trio/trio/pull/1525

njsmith avatar May 18 '20 19:05 njsmith