On Tue Feb 21 10:22:25 2023 +0000, Alexandre Julliard wrote:
Although process shutdown might be done differently, for instance
terminating the process more violently, I don't think it's a very good solution and it also doesn't solve the problem with `TerminateThread` which might be called on a thread that is waiting on a condition variable. `TerminateThread` is not supposed to cleanup anything, so it's OK if it leaves the process in a broken state. I don't think it makes sense to try to do a more orderly shutdown while still longjmping out of cleanup handlers.
Okay, well leaving the process in a possible broken state is what this MR does, are we're not unwinding, while still avoiding crashes.
What I meant was that while process termination might not have to worry about exiting the threads at all, I don't see any other option to implement `TerminateThread` than doing this longjmp + thread exit from returning.
Right now `TerminateThread` potentially crashes the entire process, which I think is a bit too much of a broken state?