From @tmds in https://github.com/dotnet/runtime/pull/125848/changes#r2986434814:
It could be made a native lock that SystemNative_Pipe would also use, then the logic would apply also to pipes that are created elsewhere and then passed as handle properties
We should revisit this idea after introducing the ability to restrict handle inheritance. Because then it could be a reader lock for limited inheritance and write lock for default settings (on Unixes that don't support atomic creation of non-inheritable pipes).
From @tmds in https://github.com/dotnet/runtime/pull/125848/changes#r2986434814:
We should revisit this idea after introducing the ability to restrict handle inheritance. Because then it could be a reader lock for limited inheritance and write lock for default settings (on Unixes that don't support atomic creation of non-inheritable pipes).