Re: [PATCH] win32: wrap socket close() with an exception handler

2023-05-24 Thread Marc-André Lureau
On Mon, May 15, 2023 at 5:25 PM wrote: > From: Marc-André Lureau > > Since commit abe34282 ("win32: avoid mixing SOCKET and file descriptor > space"), we set HANDLE_FLAG_PROTECT_FROM_CLOSE on the socket FD, to > prevent closing the HANDLE with CloseHandle. This raises an exception > which under

[PATCH] win32: wrap socket close() with an exception handler

2023-05-15 Thread marcandre . lureau
From: Marc-André Lureau Since commit abe34282 ("win32: avoid mixing SOCKET and file descriptor space"), we set HANDLE_FLAG_PROTECT_FROM_CLOSE on the socket FD, to prevent closing the HANDLE with CloseHandle. This raises an exception which under gdb is fatal, and qemu exits. Let's catch the expec