summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-08-16 08:21:42 (GMT)
committerGuido van Rossum <guido@python.org>2001-08-16 08:21:42 (GMT)
commit70d893a6aaf335383d2efcf7c40194e4f1a7e474 (patch)
tree5c41f9d3b285915052cf8eb32d2c1fbc55953642 /Python/pythonrun.c
parentba21a49f9d55edf699d40b9a6a5a5499a4b233b4 (diff)
downloadcpython-70d893a6aaf335383d2efcf7c40194e4f1a7e474.zip
cpython-70d893a6aaf335383d2efcf7c40194e4f1a7e474.tar.gz
cpython-70d893a6aaf335383d2efcf7c40194e4f1a7e474.tar.bz2
Bunchathings:
- initsigs(): Ignore SIGXFZ so writing files beyond the file system size limit won't kill us. - Py_Initialize(): call _Py_ReadyTypes() instead of readying types here. - Py_Initialize(): call _PyImport_FixupExtension() for module "extensions". (SF bug #422004.)
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index f579f44..4ee82e4 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -94,6 +94,7 @@ Py_Initialize(void)
PyThreadState *tstate;
PyObject *bimod, *sysmod;
char *p;
+ extern void _Py_ReadyTypes(void);
if (initialized)
return;
@@ -115,11 +116,7 @@ Py_Initialize(void)
Py_FatalError("Py_Initialize: can't make first thread");
(void) PyThreadState_Swap(tstate);
- if (PyType_Ready(&PyType_Type) < 0)
- Py_FatalError("Py_Initialize: can't initialize 'type'");
-
- if (PyType_Ready(&PyList_Type) < 0)
- Py_FatalError("Py_Initialize: can't initialize 'list'");
+ _Py_ReadyTypes();
interp->modules = PyDict_New();
if (interp->modules == NULL)
@@ -155,6 +152,7 @@ Py_Initialize(void)
/* phase 2 of builtins */
_PyImport_FixupExtension("__builtin__", "__builtin__");
+ _PyImport_FixupExtension("exceptions", "exceptions");
initsigs(); /* Signal handling stuff, including initintr() */
@@ -1326,6 +1324,9 @@ initsigs(void)
#ifdef SIGPIPE
signal(SIGPIPE, SIG_IGN);
#endif
+#ifdef SIGXFZ
+ signal(SIGXFZ, SIG_IGN);
+#endif
#endif /* HAVE_SIGNAL_H */
PyOS_InitInterrupts(); /* May imply initsignal() */
}