Which process knows what applications are open?
The process which keeps track of all processes is launchd (PID 1) which is the first process launched when the OS starts. There is no standard way of killing it (technically speaking sending the TERM or KILL signal will not kill it), if you could it would immediately lead to a reboot.