[issue8154] os.execlp('true') crashes the interpreter on 2.x
Alexander Belopolsky
report at bugs.python.org
Wed Mar 17 00:19:03 CET 2010
Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:
The original report, issue1039 has a better problem description:
"In a windows debug build, an assertion is triggered when os.execvpe is
called with an empty argument list:
self.assertRaises(OSError, os.execvpe, 'no such app-', [], None)"
The patch, file8338/os.diff is complete with a test and should be easy to apply to the trunk.
I would be -0 on the change. On one hand, POSIX seems to require a non-empty argument list, on the other hand at least Linux and MacOS X appear to be happy with os.execlp('true'). Furthemore, the proposed change will change the exception from os.execlp('no such program') from OSError to ValueError, which is not a backward compatible change. As such it is certainly not appropriate for bug-fix releases.
As far as 3x series are concerned, I think ValueError exception should be documented.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8154>
_______________________________________
More information about the Python-bugs-list
mailing list