summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2010-06-13 06:50:39 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2010-06-13 06:50:39 (GMT)
commit8842c356aa98869e3d80b10cad5d5aeee22d5569 (patch)
tree2218137a22ed0b073e812c8dc60be3a71fd056b7 /Modules
parentbffd62ee0c68210ea3c83b1f0fb413a33227933a (diff)
downloadcpython-8842c356aa98869e3d80b10cad5d5aeee22d5569.zip
cpython-8842c356aa98869e3d80b10cad5d5aeee22d5569.tar.gz
cpython-8842c356aa98869e3d80b10cad5d5aeee22d5569.tar.bz2
Revert r80580 due to some unintended side effects. See issue #8202 for details.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 7d735a8..a13d166 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -519,10 +519,12 @@ Py_Main(int argc, char **argv)
}
if (module != NULL) {
- /* Backup _PyOS_optind and force sys.argv[0] = '-m'
- so that PySys_SetArgv correctly sets sys.path[0] to ''*/
+ /* Backup _PyOS_optind and force sys.argv[0] = '-c'
+ so that PySys_SetArgv correctly sets sys.path[0] to ''
+ rather than looking for a file called "-m". See
+ tracker issue #8202 for details. */
_PyOS_optind--;
- argv[_PyOS_optind] = "-m";
+ argv[_PyOS_optind] = "-c";
}
PySys_SetArgv(argc-_PyOS_optind, argv+_PyOS_optind);