[Python-bugs-list] [Bug #115147] os.execvp ignores first item in arguments
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 22 Sep 2000 22:22:29 -0700
Bug #115147, was updated on 2000-Sep-22 15:41
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Closed
Resolution: Invalid
Bug Group: Not a Bug
Priority: 5
Summary: os.execvp ignores first item in arguments
Details: purp@wug:~/wbhome/tests/lsf [15:38] <139> python
Python 1.5.2 (#1, May 9 2000, 15:05:56) [GCC 2.95.3 19991030 (prerelease)] on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import os
>>> os.execvp('echo',['foo','bar'])
bar
That seems odd... off-by-one error?
Follow-Ups:
Date: 2000-Sep-22 16:59
By: tim_one
Comment:
Assigned to Fred as he's the only Unix guy around this weekend, but marked Not-a-Bug and Invalid. Fred, how about you Close it after adding a line to the docs? This is almost a FAQ.
The arglist passed to one of these guys becomes argv on the other end, and, as always, argv[0] is the file name associated with the file being executed. See any manpage for execvp; this is inherited directly from how Unix(tm) defines these functions.
-------------------------------------------------------
Date: 2000-Sep-22 22:22
By: fdrake
Comment:
Added explanation of how the first program argument (arg0 or args[0]) passed to the various exec*() functions is used. Checked in as Doc/lib/libos.tex revision 1.47.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=115147&group_id=5470