-
Notifications
You must be signed in to change notification settings - Fork 653
uv_spawn env+path semantics #122
Comments
Dropping the path search code entirely and using the search mechanics built into CreateProcess should also be considered. The downside is that it uses a different search rules than what (I think) people are familiar with from cmd.exe / spawnvpe(). |
There are many options. They all suck to a greater or lesser extent. Windows has a bunch of rules in different places. I'm not really sure users will have any consistent expectations.
Not directly used, but another Win32 lookup behaviour is found in With the exception of
I don't think trying to replicate
The I think any of these three options is reasonable. I think it boils down to a question of whether we want:
I am a strong -1 on the current code--it's complex, it doesn't correspond with any built-in API or C/POSIX function, its rules aren't really documented to callers--and a +0 on each of the above three. Perhaps a +0.5 on option 3. |
uv_spawn uses the
PATH
environment variable to locate the executable to be spawned.On unix, if the user explicitly supplies an environment block, the
PATH
from this environment is used. If the supplied environment does not contain aPATH
variable,:/bin:/usr/bin
is used as a fallback.On windows the search path from the parent process is always used.
This semantic difference may need to be resolved.
The text was updated successfully, but these errors were encountered: