Ralf Habacker (@rhabacker) commented about server/fd.c:
> set_error( STATUS_OBJECT_NAME_COLLISION );
> goto error;
> }
> ftruncate( fd->unix_fd, 0 );
Here is a direct usage of the `unix_fd`, which may be a problem.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7650#note_100892
On Tue Apr 15 07:50:06 2025 +0000, Ralf Habacker wrote:
> Here the `unix_fd` is saved for closing the file, which is -1 in the
> case of sockets.
`unix_fd` is used in `inode_close_pending()`, `inode_destroy()`, `inode_add_closed_fd()`, `fd_destroy()` and `unmount_fd()` to close the file. In any of the mentioned location the call to close() is guarded with `if (fd->unix_fd != -1)`, so these function are already save the socket case.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7650#note_100886
This fixes a real problem and improves behavior at the same time.
- ~~Fixes: hanging when trying to run Wine built with epoll_pwait2 headers available but epoll_pwait2 is missing in the run-time kernel (i.e. build 5.11->run 5.10)~~ (already fixed.)
- Improvement: bring the improved timeout resolution to Wine builds
which didn't have epoll_pwait2 at compile time, if the run-time kernel supports it
(i.e. build 5.10->run 6.14)
This last point is especially important in my opinion, as it applies to official Proton builds.
Proton is (currently) built in Debian 11 with kernel 5.10, but SteamOS is a moving target with
a much newer kernel version being used to run these Wine builds.
These builds use the lower resolution timeouts if epoll_pwait2 is only checked for at compile-time,
when it can cheaply and easily be done at run-time instead.
~~Fixes: 87ca5db40e2c1b37423bdc25101a5c5e39e67e6f~~
~~An alternative to !7640 that kills two birds with one stone.~~
--
v6: server: Use dlsym() to check for epoll_pwait2 at run-time.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7642
--
v2: shell32: Rework rename_files.
shell32: Don't parse wildcard for rename operation.
shell32: Rework add_file_entry, add more parameters.
shell32/tests: Avoid showing UI when testing.
shell32/tests: Test NULL and empty file name for SHFileOperation.
shell32/tests: Add more tests to test_rename.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7775