Repository navigation
Conversation
On Android, /tmp is missing or owned by the shell user, so creating a global-scope named mutex fails with "Access to the path /tmp/ is denied". The CoreCLR PAL used /data/local/tmp/ there before the port to managed code.
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @dotnet/area-system-io |
|
I think it would be better for linux-bionic to go onto the "mobile" plan for named mutexes (in-proc only). |
|
linux-bionic is mostly used by Termux, which runs many .NET processes side by side. Roslyn's compiler server, the MSBuild server and the Razor server find each other through named mutexes, and the user-scoped ones already work there today (they go under $HOME). In-proc only would make every |
|
Tagging subscribers to this area: @JulieLeeMSFT, @VSadov |
All these should be using user-local mutexes now. Is TMPDIR a global (shared by all users) location or user-local location under TermUX? |
Is there a global (shared by all users/apps) location to use for the global scope? If not, I think the current behavior is correct. |
|
TMPDIR is private to the Termux app; all Termux processes run as the app's uid. Android has no location shared across apps, so there isn't a real global one. Agreed the current behavior is correct; closing. |
On Android, /tmp is missing or owned by the shell user, so
new Mutex(name, new NamedWaitHandleOptions { CurrentUserOnly = false })fails with "Access to the path '/tmp/' is denied". Before the port to managed code (#117635), the PAL used /data/local/tmp/ on Android.This falls back to the temp directory (TMPDIR) when /tmp/ isn't writable. MutexTests computes the global directory the same way instead of hardcoding /tmp/.
Tested with a Termux (linux-bionic arm64) 11.0 build: global named mutexes now work. On linux-x64, System.Threading.Tests pass both normally and with /tmp mounted read-only.
Part of #137361