Open kouvel opened 1 year ago
Tagging subscribers to this area: @mangod9 See info in area-owners.md if you want to be subscribed.
Author: | kouvel |
---|---|
Assignees: | kouvel |
Labels: | `area-System.Threading` |
Milestone: | 9.0.0 |
in netcore, named pipes added the PipeOptions.CurrentUserOnly
for this purpose (in replacement of netfx having the nightmarish full API for setting up ACLs). CurrentUserOnly is high-level enough that it allows the runtime to implement this concept the best way possible for each platform.
If I use named kernel objects, I would not be expecting the runtime to customize my name in any way (at least on Windows). The other program using my object may very well not be dotnet code. So at least for Windows, I would expect the implementation to just be setting up ACLs on my behalf.
If I use named kernel objects, I would not be expecting the runtime to customize my name in any way (at least on Windows). The other program using my object may very well not be dotnet code. So at least for Windows, I would expect the implementation to just be setting up ACLs on my behalf.
That's what I was thinking as well. Adding something like PipeOptions.CurrentUserOnly
would work too, regarding adding a new prefix to the name, I intended for it to just be a way of conveying that it is to be restricted to the creating user, the prefix doesn't have to actually be in the underlying name. Another possibility is to add some user prefix to the real name of the named mutex (in a clearly documented way) to help give those a somewhat different namespace, but that's probably not too important, and it complicates opening an existing user-specific mutex that doesn't have the prefix.
I think a new API approach may be better, as it would help to incentivize people to use user-specific named mutexes where possible (along with having a warning for all-user named mutexes), and it may even be possible in the future to deprecate the current APIs in favor of the one with an enum.