On Thu Sep 21 00:46:47 2023 +0000, Jinoh Kang wrote:
I'm not sure if it is correct to flip the "violent delth" flag parameter. Anyways, this looks like a duplicate of https://gitlab.winehq.org/wine/wine/-/merge_requests/3648, so you might want to ask about its status?
@iamahuman thanks for pointing out that older thread, I'll follow up on that!
With regards to the `violent_death` parameter, are there any guidelines around when it is appropriate to set that to a value of 1? From what I can see, it's primarily used when a protocol error is encountered (e.g. [here](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/request.c?ref_ty...) and [here](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/request.c?ref_ty...)) and the server can no longer communicate with the client process. That seems fairly similar to the abnormal process termination scenario (with the main difference being that the server isn't trying to send or receive a message at the time it detects the pipe close), but there might be some nuance there that I'm overlooking?
If there's a more appropriate mechanism to set the non-zero exit code in the abnormal process termination scenario then I'd certainly be happy to update the patch to use that instead. The current implementation was designed to be as minimally intrusive as possible whilst still achieving the desired behaviour, but I'm not familiar enough with the internal workings of the Wine server to be completely confident in its correctness, so any guidance here is much appreciated! (I'm also happy to add comments if desired, since I recognise that the current code is not particularly explicit in communicating its intent to readers.)