atexit atexit -- Registers a function on shutdown. atexit registers a function to be excuted on shutdown. Usage // 1. Command form. void sub::atexit(string command)