On Wed Feb 8 19:01:54 2023 +0000, **** wrote:
Paul Gofman replied on the mailing list:
On 2/8/23 12:55, Rémi Bernon (@rbernon) wrote: > > USR1 / USR2 / INT for instance could be blocked in non-Wine threads, raising them again until they reach a Wine thread. I think USR1 may only be received by a non-Wine thread if it was originated by some native library and not by wineserver which sends that only to threads it knows? In that case, not sure how that can be handled better in a Wine thread? Also, is there a good way to block signals in threads which are created by native libraries, I think we don't know anything about those threads?
Yes, what Paul said. If a non-Wine thread gets USR1 or USR2 it didn't come from us, and handing it to a Wine thread is not going to do the right thing.
Note that signal masks are per-thread, but according to my understanding signal *actions* aren't.
QUIT is supposed to kill the entire process by default, not just a thread, so just killing that thread doesn't seem right. I suppose we *could* exit() in that case, but QUIT also dumps core by default, so it doesn't seem quite right to do a clean exit either. At least not right enough to be worth the extra complexity.
Rethrowing INT to a Wine thread is... nontrivial, but possible, I guess? I'd rather leave it for a follow-up patch if it's really worth doing.