← Back to team overview

duplicity-team team mailing list archive

Re: [Merge] lp:~mterry/duplicity/argv into lp:duplicity

 

Positive.  The first argument to exec* is the actual command to run, the first array item in argv is the "name" of the program passed to the command and is generally chopped off.

You can test this with a simple python script:

#!/usr/bin/python
import os, sys
print sys.argv
if len(sys.argv) > 1:
    os.execve(sys.argv[0], sys.argv[1:], os.environ)

$ chmod +a ./test
$ ./test 1 2 3
['./test.py', '1', '2', '3']
['./test.py', '2', '3']
['./test.py', '3']
['./test.py']
-- 
https://code.launchpad.net/~mterry/duplicity/argv/+merge/186699
Your team duplicity-team is requested to review the proposed merge of lp:~mterry/duplicity/argv into lp:duplicity.


Follow ups

References