flock: a contended LOCK_NB request aborts the process instead of failing with EWOULDBLOCK #1763
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Zurisen on 2026-10-08T18:41:51Z.
On main (
4ddbf049),flock_nid_postfixthrows on any failure of the host call (Stdio.cpp). WithLOCK_NB, a lock held through another descriptor is an expected outcome: FreeBSDflock(2)returns -1 withEWOULDBLOCK(35), and the caller decides whether to retry. Here the process ends. Both platforms, not specific to one title.LOCK_NBflock-1,EWOULDBLOCKstd::runtime_error, process abortsLockFileExfails,ERROR_LOCK_VIOLATION(33)std::runtime_error, process abortsMeasured on Windows 11 (10.0.26200), MinGW-w64 GCC 15.2.0, with an exclusive lock on one descriptor and
flock(other, LOCK_EX | LOCK_NB)on a second descriptor of the same file:Fixed in #1764.