Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:

On Thu, Mar 18, 2010 at 3:32 PM, R. David Murray <rep...@bugs.python.org> wrote:
..
> I agree that this should be fixed, since we presumably want to be "strictly 
> conforming" to the posix standards,
> but it looks like this is a regression in either linux or glibc.  From the 
> standard's rational section:
>

Let me add just make a few observations without drawing a conclusion:

1.  This is not a crash of python.  As far as I can tell, it is the
executed program that crashes attempting to dereference argv[0]
without checking argc first.   On the platforms that support execution
with argc=0, this is a bug in the application or in the C library.

2. Currently 3.x and 2.x python throw different exceptions from
os.execlp('xyz') if xyz does not exist.   Maybe os.execlp(one_arg)
should raise OSError instead of ValueError.

3. Another alternative would be to change the signature from
os.execlp(path, ...) to os.execlp(path, name, ...) and make
os.execlp() raise TypeError if name is not supplied.   This is an
attractive possibility because it can be done by a trivial change in
os.py while preserving the ability to exec with argc=0 for those who
know what they are doing.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8154>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to