926f896c1f2080be27750ea934dbb01969f24c10
[senf.git] / scons / scons-1.2.0 / os_spawnv_fix.diff
1 ? dist/src/Mac/IDE scripts/Hold option to open a script\r
2 ? dist/src/Mac/IDE scripts/Insert file name\r
3 ? dist/src/Mac/IDE scripts/Insert folder name\r
4 ? dist/src/Mac/IDE scripts/Search Python Documentation\r
5 ? dist/src/Mac/IDE scripts/Hack/Remove .pyc files\r
6 ? dist/src/Mac/IDE scripts/Hack/Toolbox Assistant\r
7 Index: dist/src/Modules/posixmodule.c\r
8 ===================================================================\r
9 RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v\r
10 retrieving revision 2.213\r
11 diff -c -c -r2.213 posixmodule.c\r
12 *** dist/src/Modules/posixmodule.c      2001/12/03 20:41:00     2.213\r
13 --- dist/src/Modules/posixmodule.c      2001/12/05 00:52:58\r
14 ***************\r
15 *** 1668,1674 ****\r
16   #ifdef HAVE_SPAWNV\r
17   static char posix_spawnv__doc__[] =\r
18   "spawnv(mode, path, args)\n\\r
19 ! Execute an executable path with arguments, replacing current process.\n\\r
20   \n\\r
21         mode: mode of process creation\n\\r
22         path: path of executable file\n\\r
23 --- 1668,1674 ----\r
24   #ifdef HAVE_SPAWNV\r
25   static char posix_spawnv__doc__[] =\r
26   "spawnv(mode, path, args)\n\\r
27 ! Execute the program 'path' in a new process.\n\\r
28   \n\\r
29         mode: mode of process creation\n\\r
30         path: path of executable file\n\\r
31 ***************\r
32 *** 1717,1724 ****\r
33   \r
34         if (mode == _OLD_P_OVERLAY)\r
35                 mode = _P_OVERLAY;\r
36         spawnval = _spawnv(mode, path, argvlist);\r
37\r
38         PyMem_DEL(argvlist);\r
39   \r
40         if (spawnval == -1)\r
41 --- 1717,1727 ----\r
42   \r
43         if (mode == _OLD_P_OVERLAY)\r
44                 mode = _P_OVERLAY;\r
45 +       \r
46 +       Py_BEGIN_ALLOW_THREADS\r
47         spawnval = _spawnv(mode, path, argvlist);\r
48 !       Py_END_ALLOW_THREADS\r
49 !       \r
50         PyMem_DEL(argvlist);\r
51   \r
52         if (spawnval == -1)\r
53 ***************\r
54 *** 1734,1740 ****\r
55   \r
56   static char posix_spawnve__doc__[] =\r
57   "spawnve(mode, path, args, env)\n\\r
58 ! Execute a path with arguments and environment, replacing current process.\n\\r
59   \n\\r
60         mode: mode of process creation\n\\r
61         path: path of executable file\n\\r
62 --- 1737,1743 ----\r
63   \r
64   static char posix_spawnve__doc__[] =\r
65   "spawnve(mode, path, args, env)\n\\r
66 ! Execute the program 'path' in a new process.\n\\r
67   \n\\r
68         mode: mode of process creation\n\\r
69         path: path of executable file\n\\r
70 ***************\r
71 *** 1830,1836 ****\r
72 --- 1833,1843 ----\r
73   \r
74         if (mode == _OLD_P_OVERLAY)\r
75                 mode = _P_OVERLAY;\r
76\r
77 +       Py_BEGIN_ALLOW_THREADS\r
78         spawnval = _spawnve(mode, path, argvlist, envlist);\r
79 +       Py_END_ALLOW_THREADS\r
80\r
81         if (spawnval == -1)\r
82                 (void) posix_error();\r
83         else\r