Is there a way to know (a Message?) when a command running in the terminal terminates? Or, put differently, when a terminal stops?