homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients benrg, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2022年02月26日.06:00:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645855231.38.0.441824773566.issue46862@roundup.psfhosted.org>
In-reply-to
Content
This should be handled in _winapi.CreateProcess(). An environment block is technically required to be sorted. (Ages ago this was a MUST requirement for getting and setting variables to work correctly, since the implementation depended on the sort order, but I think nowadays it's a SHOULD requirement.) For example, see the documentation of CreateProcessW() [1]:
 If an application provides an environment block, ... explicitly create
 these environment variable strings, sort them alphabetically (because
 the system uses a sorted environment)
"Changing Environment Variables" is more specific [2]:
 All strings in the environment block must be sorted alphabetically by name.
 The sort is case-insensitive, Unicode order, without regard to locale.
CompareStringOrdinal() [3] implements a case-insensitive ordinal comparison. When a key compares as equal, either keep the current one in the sorted list, or replace it with the new key.
---
[1] https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw
[2] https://docs.microsoft.com/en-us/windows/win32/procthread/changing-environment-variables
[3] https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-comparestringordinal 
History
Date User Action Args
2022年02月26日 06:00:31eryksunsetrecipients: + eryksun, paul.moore, tim.golden, benrg, zach.ware, steve.dower
2022年02月26日 06:00:31eryksunsetmessageid: <1645855231.38.0.441824773566.issue46862@roundup.psfhosted.org>
2022年02月26日 06:00:31eryksunlinkissue46862 messages
2022年02月26日 06:00:31eryksuncreate

AltStyle によって変換されたページ (->オリジナル) /