New issue 2981: script exited with `exit` break from pypy interactive mode https://bitbucket.org/pypy/pypy/issues/2981/script-exited-with-exit-break-from-pypy
wrq: `pypy -i -c 'exit(-1)'` did not provide an interactive pypy console on exit, and so do any script exited with the obvious exit function; `sys.exit` is unaffected. I use pypy2, so more versions are not tested, I would suggest that anyone test this on all platforms. ``` [dummy@f2e2157eeb03 project]$ pypy -i -c 'import sys;sys.exit(-1)' Traceback (most recent call last): File "<builtin>/app_main.py", line 76, in handle_sys_exit SystemExit: -1 >>>> [dummy@f2e2157eeb03 project]$ pypy -i -c 'exit(-1)' Traceback (most recent call last): File "<builtin>/app_main.py", line 76, in handle_sys_exit SystemExit: -1 Traceback (most recent call last): File "/usr/lib64/pypy-6.0/lib_pypy/_pypy_interact.py", line 30, in interactive_console if not os.isatty(sys.stdin.fileno()): ValueError: I/O operation on closed file [dummy@f2e2157eeb03 project]$ python -i -c 'import sys;sys.exit(-1)' Traceback (most recent call last): File "<string>", line 1, in <module> SystemExit: -1 >>> [dummy@f2e2157eeb03 project]$ python -i -c 'exit(-1)' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib64/python2.7/site.py", line 355, in __call__ raise SystemExit(code) SystemExit: -1 >>> [dummy@f2e2157eeb03 project]$ pypy --version Python 2.7.13 (1d8462e42c37, Aug 30 2018, 09:58:57) [PyPy 6.0.0 with GCC 8.2.1 20180801 (Red Hat 8.2.1-2)] ``` _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue