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 2012年01月24日 18:08 by brandjon, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg151921 - (view) | Author: Jon Brandvein (brandjon) | Date: 2012年01月24日 18:08 | |
In a child process, raising SystemExit or calling sys.exit with a non-integer, non-string argument value causes a TypeError at Lib/multiprocessing/process.py :: _bootstrap. This is from concatenating the argument with '\n' and writing it to stderr. Suggested fix: replace sys.stderr.write(e.args[0] + '\n') with sys.stderr.write(str(e.args[0]) + '\n') This problem also occurs when the value is None, but only for raising SystemExit (not calling sys.exit()). |
|||
| msg151951 - (view) | Author: Jon Brandvein (brandjon) | Date: 2012年01月25日 17:25 | |
Also, as Brett pointed out to me in #13853, bool is a subclass of int, so they should follow the same code path. I suggest replacing elif type(e.args[0]) is int: exitcode = e.args[0] with something like elif isinstance(e.args[0], int): exitcode = e.args[0] which assumes that a subtype of int is convertible to int. |
|||
| msg162494 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年06月07日 19:42 | |
New changeset 4346cba353b4 by Richard Oudkerk in branch '3.2': Issue #13854: Properly handle non-integer, non-string arg to SystemExit http://hg.python.org/cpython/rev/4346cba353b4 New changeset 3585cb1388f2 by Richard Oudkerk in branch 'default': Merge fixes for #13854 and #12157. http://hg.python.org/cpython/rev/3585cb1388f2 New changeset da5b370f41a1 by Richard Oudkerk in branch '2.7': Issue #13854: Properly handle non-integer, non-string arg to SystemExit http://hg.python.org/cpython/rev/da5b370f41a1 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:26 | admin | set | github: 58062 |
| 2012年06月07日 22:18:42 | sbt | set | status: open -> closed resolution: fixed stage: resolved |
| 2012年06月07日 19:42:03 | python-dev | set | nosy:
+ python-dev messages: + msg162494 |
| 2012年06月06日 12:24:48 | sbt | set | nosy:
+ sbt |
| 2012年01月25日 17:25:47 | brandjon | set | messages: + msg151951 |
| 2012年01月24日 18:08:45 | brandjon | create | |