]> granicus.if.org Git - python/commitdiff
Michael Hudson fixes a case where execv() is called (for a test) with
authorGuido van Rossum <guido@python.org>
Wed, 26 Apr 2000 20:32:08 +0000 (20:32 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 26 Apr 2000 20:32:08 +0000 (20:32 +0000)
an empty argument list -- another patch he's checking in will make
this illegal (the first argument should always be the program name).

Lib/os.py

index 7f70f30e7227c123a69ff2d4952f033bc75ab2a3..c7a3cc5a57b178a1c82d8eaf41169000ff6b67b5 100644 (file)
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -252,7 +252,7 @@ def _execvpe(file, args, env=None):
     if not _notfound:
         import tempfile
         # Exec a file that is guaranteed not to exist
-        try: execv(tempfile.mktemp(), ())
+        try: execv(tempfile.mktemp(), ('blah',))
         except error, _notfound: pass
     exc, arg = error, _notfound
     for dir in PATH: