git-annex/Utility/LockFile
Joey Hess 6ba848d275
avoid overhead of fcntl when setting close-on-exec
unix-2.8.0 adds cloexec to OpenFileFlags, rather than needing to call
setFdOption after opening.

This also might avoid a race, if another thread started a process at
just the wrong time, before the flag got set, it could inherit the FD.

Unfortunately, the arm64-ancient build needs support for older versions
of unix than that, so had to ifdef. That build is still needed to
support using git-annex in termux on phones like mine, I have confirmed
today.

Sponsored-by: Luke T. Shumaker
2025-09-04 15:04:03 -04:00
..
LockStatus.hs explict export lists 2019-11-21 16:08:37 -04:00
PidLock.hs more OsPath conversion 2025-02-11 14:00:01 -04:00
Posix.hs avoid overhead of fcntl when setting close-on-exec 2025-09-04 15:04:03 -04:00
Windows.hs OsPath transition Windows build fixes 2025-02-11 15:40:53 -04:00