ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH

Reference
ActivePython 2.5
Python Documentation
Python/C API
5. Utilities
5.1 Operating System Utilities
5.2 Process Control
5.3 Importing Modules
5.4 Data marshalling support
5.5 Parsing arguments and building values
5.6 String conversion and formatting

MyASPN >> Reference >> ActivePython 2.5 >> Python Documentation >> Python/C API >> 5. Utilities
ActivePython 2.5 documentation


5.2 Process Control

void Py_FatalError(const char *message)
Print a fatal error message and kill the process. No cleanup is performed. This function should only be invoked when a condition is detected that would make it dangerous to continue using the Python interpreter; e.g., when the object administration appears to be corrupted. On Unix, the standard C library function abort() is called which will attempt to produce a core file.

void Py_Exit(int status)
Exit the current process. This calls Py_Finalize() and then calls the standard C library function exit(status).

int Py_AtExit(void (*func) ())
Register a cleanup function to be called by Py_Finalize(). The cleanup function will be called with no arguments and should return no value. At most 32 cleanup functions can be registered. When the registration is successful, Py_AtExit() returns 0; on failure, it returns -1. The cleanup function registered last is called first. Each cleanup function will be called at most once. Since Python's internal finalization will have completed before the cleanup function, no Python APIs should be called by func.

See About this document... for information on suggesting changes.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved