The issue is that since Big Sur we cannot get the env vars of another process, most of the time. We can only get them if one of these conditions holds:
Seems like we can get it from an R process, even in RStudio where the exe of the main process is not the same as for the child process. I am not sure why.
There is not much we can do about this, but we need to document it, and it also affects process tree cleanup, here and in processx as well.
The issue is that since Big Sur we cannot get the env vars of another process, most of the time. We can only get them if one of these conditions holds:
From https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/kern/kern_sysctl.c#L1315-L1321
Seems like we can get it from an R process, even in RStudio where the exe of the main process is not the same as for the child process. I am not sure why.
There is not much we can do about this, but we need to document it, and it also affects process tree cleanup, here and in processx as well.