[issue8154] os.execlp('true') crashes the interpreter on 2.x

Matthias Klose report at bugs.python.org
Wed Mar 17 00:46:42 CET 2010


Matthias Klose <doko at debian.org> added the comment:

it does crash:

$ python
Python 2.6.5rc2 (r265rc2:78822, Mar 11 2010, 13:01:50) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.execlp('true')
Segmentation fault (core dumped)

arg[0] (the command name) must be part of the second parameter.


side notice: the execlpe looks inconsistent (both 2.x and 3.x).

>>> os.execlpe('true')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/os.py", line 335, in execlpe
    env = args[-1]
IndexError: tuple index out of range

shouldn't this be a ValueError as well?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8154>
_______________________________________


More information about the Python-bugs-list mailing list