Handbook
Glossary
exit ( n -- * )
Factor handbook
»
The implementation
»
System interface
Prev:
nano-count ( -- ns )
Next:
quit ( -- * )
Vocabulary
system
Inputs
n
an integer exit code
Outputs
None
Word description
Runs all
shutdown-hooks
and then exits the Factor process. If an error occurs when the shutdown hooks runs, or when the process is about to terminate, the error is ignored and the process exits with status 255.
Definition
USING:
continuations
init
io
;
IN:
system
:
exit
( n -- * )
[
do-shutdown-hooks
(exit)
]
ignore-errors
[
"Unexpected error during shutdown!"
print
flush
]
ignore-errors
255
(exit)
;