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 Arfrever, docs@python, eryksun, martin.panter
Date 2021-02-26.19:37:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614368225.47.0.915107209673.issue24045@roundup.psfhosted.org>
In-reply-to
Content
It's still the case in 3.10 that unsigned status codes are limited to 0x7FFF_FFFF, and any larger value gets mapped to -1 (0xFFFF_FFFF). For example:

    >>> rc = subprocess.call([sys.executable, '-c', 'raise SystemExit(0x7FFF_FFFF)'])
    >>> hex(rc)
    '0x7fffffff'
    >>> rc = subprocess.call([sys.executable, '-c', 'raise SystemExit(0x8000_0000)'])
    >>> hex(rc)
    '0xffffffff'
    >>> rc = subprocess.call([sys.executable, '-c', 'raise SystemExit(0xC000_0005)'])
    >>> hex(rc)
    '0xffffffff'

WinAPI ExitProcess() and GetExitCodeProcess() use unsigned values. The latter is called by subprocess.Popen.wait(). In practice, this return code, which may be larger than 0x7FFF_FFFF, might get passed to SystemExit() or os._exit().
History
Date User Action Args
2021-02-26 19:37:05eryksunsetrecipients: + eryksun, Arfrever, docs@python, martin.panter
2021-02-26 19:37:05eryksunsetmessageid: <1614368225.47.0.915107209673.issue24045@roundup.psfhosted.org>
2021-02-26 19:37:05eryksunlinkissue24045 messages
2021-02-26 19:37:05eryksuncreate