Python os.abort() Method
Example
Terminate a running process immediately:
#Import OS Library
import os
print ("Process abort after printing this line")
#Abort the current running process
os.abort()
print ("Process abort before printing this line")
Run Code »
Definition and Usage
The os.abort()
method terminates a running process immediately.
This method generates a SIGABRT signal which means "signal abort". For UNIX, this method produces a core dump; on Windows, this method produces exit code 3.
Note: Calling this function will not call the Python signal handler registered for SIGABRT with signal.signal().
Syntax
os.abort()
Technical Details
Return Value: | None. |
---|---|
Python Version: | 1.6 |