-
-
Notifications
You must be signed in to change notification settings - Fork 15k
File::lock (probably) behaves incorrectly on Solaris #157390
Copy link
Copy link
Closed
Labels
A-filesystemArea: `std::fs`Area: `std::fs`C-bugCategory: This is a bug.Category: This is a bug.O-solarisOperating system: SolarisOperating system: SolarisT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-filesystemArea: `std::fs`Area: `std::fs`C-bugCategory: This is a bug.Category: This is a bug.O-solarisOperating system: SolarisOperating system: SolarisT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
File::lockis documented asThis seems to say fairly clearly that the lock is scoped to the handle.
However, on Solaris, this is implemented with
fcntl(fd, F_SETLK). The regular POSIX behavior for this lock is that it is process-scoped, and the docs I was able to find for Solaris seem to confirm that:(emphasis mine)
So... shouldn't we just return "lock() not supported" on Solaris, like we do for other Unixes that don't have
flock?This was implemented in #146269.
Cc @the8472 @weihanglo @Mark-Simulacrum @psumbera @kulikjak