Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.spawnv fails when argv is a length 1 tuple #43524

Closed
ncloud mannequin opened this issue Jun 19, 2006 · 2 comments
Closed

os.spawnv fails when argv is a length 1 tuple #43524

ncloud mannequin opened this issue Jun 19, 2006 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@ncloud
Copy link
Mannequin

ncloud mannequin commented Jun 19, 2006

BPO 1508833

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2006-06-19.20:00:44.000>
created_at = <Date 2006-06-19.18:48:41.000>
labels = ['invalid', 'library']
title = 'os.spawnv fails when argv is a length 1 tuple'
updated_at = <Date 2006-06-19.20:00:44.000>
user = 'https://bugs.python.org/ncloud'

bugs.python.org fields:

activity = <Date 2006-06-19.20:00:44.000>
actor = 'ncloud'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2006-06-19.18:48:41.000>
creator = 'ncloud'
dependencies = []
files = []
hgrepos = []
issue_num = 1508833
keywords = []
message_count = 2.0
messages = ['28837', '28838']
nosy_count = 1.0
nosy_names = ['ncloud']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1508833'
versions = ['Python 2.4']

@ncloud
Copy link
Mannequin Author

ncloud mannequin commented Jun 19, 2006

os.spawnv fails when argv is a length 1 tuple.

For example, this will fail:
os.spawnv (os.P_WAIT, '/bin/pwd', ('/bin/pwd'))

Bug exists on Python 2.4.3 on FreeBSD.
Bug exists on Python 2.3.5 on Gentoo Linux.

Longer example:
----

$ cat test.py
import os

path = '/bin/pwd'

print

print 'calling os.spawnv with length 1 tuple...'
print 'exit code:', os.spawnv ( os.P_WAIT, path, ( path ) )

print

print 'calling os.spawnv with length 1 list...'
print 'exit code:', os.spawnv ( os.P_WAIT, path, [ path ] )

print
----

----

$ python test.py

calling os.spawnv with length 1 tuple...
exit code: 127

calling os.spawnv with length 1 list...
/home/private
exit code: 0

----

@ncloud ncloud mannequin closed this as completed Jun 19, 2006
@ncloud ncloud mannequin added invalid stdlib Python modules in the Lib dir labels Jun 19, 2006
@ncloud ncloud mannequin closed this as completed Jun 19, 2006
@ncloud ncloud mannequin added invalid stdlib Python modules in the Lib dir labels Jun 19, 2006
@ncloud
Copy link
Mannequin Author

ncloud mannequin commented Jun 19, 2006

Logged In: YES
user_id=1542556

My apologies. I'm new to python and had not realize that

( x )

is not a tuple, while

( x, )

is a tuple.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

0 participants