Python os.EX_OK Constant
Example
Exit code after successful termination:
#Import os Library
import os
# Create a child process using os.fork() method
pid = os.fork()
#pid greater than 0 indicates the parent process
if pid > 0:
print("\nIn parent process")
else :
print("In child process")
# Exit with status os.EX_OK
os._exit(os.EX_OK)
Try it Yourself »
Definition and Usage
The os.EX_OK
represents successful termination without any error occured. The successful exit is always indicated by a status of 0.
Note: Available only on UNIX platforms.
Syntax
os.EX_OK
Technical Details
Return Value: | None |
---|---|
Python Version: | 2.3 |