Add exit function in core module.
This function allow to interrupt the script execution. The parameter exit code is returned by pugs when leaving.
This function allow to interrupt the script execution. The parameter exit code is returned by pugs when leaving.