[Python-checkins] CVS: python/dist/src/Python pythonrun.c,2.144,2.145

Guido van Rossum gvanrossum@users.sourceforge.net
Thu, 16 Aug 2001 01:21:45 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv1011

Modified Files:
	pythonrun.c 
Log Message:
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.)


Index: pythonrun.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v
retrieving revision 2.144
retrieving revision 2.145
diff -C2 -d -r2.144 -r2.145
*** pythonrun.c	2001/08/13 23:04:56	2.144
--- pythonrun.c	2001/08/16 08:21:42	2.145
***************
*** 95,98 ****
--- 95,99 ----
  	PyObject *bimod, *sysmod;
  	char *p;
+ 	extern void _Py_ReadyTypes(void);
  
  	if (initialized)
***************
*** 115,124 ****
  		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'");
  
  	interp->modules = PyDict_New();
--- 116,121 ----
  		Py_FatalError("Py_Initialize: can't make first thread");
  	(void) PyThreadState_Swap(tstate);
  
! 	_Py_ReadyTypes();
  
  	interp->modules = PyDict_New();
***************
*** 156,159 ****
--- 153,157 ----
  	/* phase 2 of builtins */
  	_PyImport_FixupExtension("__builtin__", "__builtin__");
+ 	_PyImport_FixupExtension("exceptions", "exceptions");
  
  	initsigs(); /* Signal handling stuff, including initintr() */
***************
*** 1326,1329 ****
--- 1324,1330 ----
  #ifdef SIGPIPE
  	signal(SIGPIPE, SIG_IGN);
+ #endif
+ #ifdef SIGXFZ
+ 	signal(SIGXFZ, SIG_IGN);
  #endif
  #endif /* HAVE_SIGNAL_H */