summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-06-02 03:50:56 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-06-02 03:50:56 (GMT)
commit82bfcc87f023c0423443c6691b1d9ad2db4fb4a5 (patch)
tree74808a7b2f027cc70283ddef82440432d0aa16b5 /Mac
parentc92c97cc04b2233d4009f95f7d9b91456d35a282 (diff)
downloadcpython-82bfcc87f023c0423443c6691b1d9ad2db4fb4a5.zip
cpython-82bfcc87f023c0423443c6691b1d9ad2db4fb4a5.tar.gz
cpython-82bfcc87f023c0423443c6691b1d9ad2db4fb4a5.tar.bz2
Merged revisions 81649 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81649 | ronald.oussoren | 2010-06-02 05:47:14 +0200 (Wed, 02 Jun 2010) | 5 lines Fix for issue8868: without this patch 'MacOS.WMAvailable()' will return False on MacOSX 10.5 or earlier and scripts won't be able to access GUI functionality. ........
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Tools/pythonw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Mac/Tools/pythonw.c b/Mac/Tools/pythonw.c
index 8da6f47..0b2fafc 100644
--- a/Mac/Tools/pythonw.c
+++ b/Mac/Tools/pythonw.c
@@ -151,6 +151,14 @@ int
main(int argc, char **argv) {
char* exec_path = get_python_path();
+ /*
+ * Let argv[0] refer to the new interpreter. This is needed to
+ * get the effect we want on OSX 10.5 or earlier. That is, without
+ * changing argv[0] the real interpreter won't have access to
+ * the Window Server.
+ */
+ argv[0] = exec_path;
+
#ifdef HAVE_SPAWN_H
/* We're weak-linking to posix-spawnv to ensure that
* an executable build on 10.5 can work on 10.4.