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.
Created on 2010年04月20日 12:02 by vstinner, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| subprocess_errmsg.patch | vstinner, 2010年04月20日 12:02 | |||
| Messages (2) | |||
|---|---|---|---|
| msg103694 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年04月20日 12:02 | |
On a non-Windows OS where _posixsubprocess is missing (subprocess uses the pure Python implementation), if the child fails with a Python exception and the exception message contains a surrogate character, message.encode() fails silently (exception while processing exceptions are just ignored). Surrogates should be passed to the parent process: surrogatepass can be used for that. Attached patch implements this idea with an unit test. -- _posixsubprocess is not concerned because it writes an empty message for OSError (the parent process calls os.strerror() to get the message) or "Exception occurred in preexec_fn." (pure ASCII string) for RuntimeError. On Windows, _subprocess.CreateProcess() calls PyErr_SetFromWindowsErr() on failure without the filename. So there is no surrogates here. |
|||
| msg104045 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年04月23日 20:22 | |
Commited in py3k (r80413), blocked in 3.1 (r80414). Python 3.1 uses pickle to encode the traceback and pickle supports surrogates (see #8383). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:00 | admin | set | github: 52713 |
| 2010年04月23日 20:22:34 | vstinner | set | status: open -> closed resolution: fixed messages: + msg104045 |
| 2010年04月20日 12:03:16 | vstinner | link | issue8242 dependencies |
| 2010年04月20日 12:03:03 | vstinner | set | components: + Unicode |
| 2010年04月20日 12:02:54 | vstinner | create | |