Author eryksun
Recipients eryksun, jwilk, ncoghlan, njs, ztane
Date 2018-03-20.03:08:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521515292.68.0.467229070634.issue33053@psf.upfronthosting.co.za>
In-reply-to
Content
> the way `python -m pip` searches for the module to execute is much 
> closer to the way Windows searches for a command like `pip` (i.e. 
> current directory first)

That's classic Windows behavior. However, search paths for CreateProcess and the loader are composed on demand, which allows different behavior to be selected easily enough. The current behavior depends on a mix of environment variables, registry settings, reserved names (known DLLs, API sets), application and DLL manifests, .local redirection, and in-process configuration. For example, to skip the working directory when searching for DLLs, there's the CWDIllegalInDllSearch registry setting, SetDllDirectoryW(L""), or SetDefaultDllDirectories (the latter removes PATH as well, so it's not suited for loosely-couple systems). To skip  the working directory when searching for executables, define the environment variable "NoDefaultCurrentDirectoryInExePath".
History
Date User Action Args
2018-03-20 03:08:12eryksunsetrecipients: + eryksun, ncoghlan, jwilk, njs, ztane
2018-03-20 03:08:12eryksunsetmessageid: <1521515292.68.0.467229070634.issue33053@psf.upfronthosting.co.za>
2018-03-20 03:08:12eryksunlinkissue33053 messages
2018-03-20 03:08:11eryksuncreate