The program being debugged is exited via exit() which runs the Kernel at_exit() finalizers.
If a return code is given,
that is the return code passed to exit() — presumably the return code that will be passed back to the OS.
If no exit code is given,
0 is used.