trap cmd-Q to quit while a session is running