Revert r80580 due to some unintended side effects. See issue #8202 for details.

This commit is contained in:
Nick Coghlan 2010-06-13 06:50:39 +00:00
parent bffd62ee0c
commit 8842c356aa
3 changed files with 11 additions and 6 deletions

View file

@ -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);