Upstream Solaris flock emulation to libstd from cargo. This is borrowed from 3b379fcc54/src/cargo/util/flock.rs (L502-L536) which was implemented by an Oracle employee. The code has been in cargo since 2022-12. Python's `fcntl.flock` emulates like this as well: c919d02ede/Modules/fcntlmodule.c (L337-L400) We did the same thing in 0d0f4eac8b/compiler/rustc_data_structures/src/flock/unix.rs (L13-L39)
3b379fcc54/src/cargo/util/flock.rs (L502-L536)
c919d02ede/Modules/fcntlmodule.c (L337-L400)
0d0f4eac8b/compiler/rustc_data_structures/src/flock/unix.rs (L13-L39)