summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorMark Hammond <mhammond@skippinet.com.au>2002-08-02 02:27:13 (GMT)
committerMark Hammond <mhammond@skippinet.com.au>2002-08-02 02:27:13 (GMT)
commitfe51c6d66e0fbf6a142036bee2c448bd7fe8fefc (patch)
tree3e1294c64f28a968ac564e96571154f1f591f95f /Modules/posixmodule.c
parentd3c884d4ea6f9e3bf68100734bdf7040db9397cb (diff)
downloadcpython-fe51c6d66e0fbf6a142036bee2c448bd7fe8fefc.zip
cpython-fe51c6d66e0fbf6a142036bee2c448bd7fe8fefc.tar.gz
cpython-fe51c6d66e0fbf6a142036bee2c448bd7fe8fefc.tar.bz2
Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototype
for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index bf178f8..9b7640f 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -3211,6 +3211,7 @@ _PyPopenCreateProcess(char *cmdstring,
{
PROCESS_INFORMATION piProcInfo;
STARTUPINFO siStartInfo;
+ DWORD dwProcessFlags = 0; /* no NEW_CONSOLE by default for Ctrl+C handling */
char *s1,*s2, *s3 = " /c ";
const char *szConsoleSpawn = "w9xpopen.exe";
int i;
@@ -3303,6 +3304,16 @@ _PyPopenCreateProcess(char *cmdstring,
s1,
s3,
cmdstring);
+ /* Not passing CREATE_NEW_CONSOLE has been known to
+ cause random failures on win9x. Specifically a
+ dialog:
+ "Your program accessed mem currently in use at xxx"
+ and a hopeful warning about the stability of your
+ system.
+ Cost is Ctrl+C wont kill children, but anyone
+ who cares can have a go!
+ */
+ dwProcessFlags |= CREATE_NEW_CONSOLE;
}
}
@@ -3328,7 +3339,7 @@ _PyPopenCreateProcess(char *cmdstring,
NULL,
NULL,
TRUE,
- 0, /* no new console so Ctrl+C kills child too */
+ dwProcessFlags,
NULL,
NULL,
&siStartInfo,
@@ -6746,7 +6757,7 @@ all_ins(PyObject *d)
#define MODNAME "posix"
#endif
-DL_EXPORT(void)
+PyMODINIT_FUNC
INITFUNC(void)
{
PyObject *m, *v;