Daemon and terminal mode terminating callbacks.