“Some commands are still running” after sleep 1; exit
If I run
$ sleep 1; exit
I get this warning from Console:
Close Tab?
Some commands are still running, closing this tab will kill them and may lead to unexpected outcomes
sleep 1
even though sleep 1
has clearly already finished—otherwise the exit
that’s triggering the tab to close would not yet have been reached.
This happens to me all the time if I’m too fast to press Ctrl+D to exit the shell after a child command finishes.
It seems Console only checks the list of running children on a timer, and neglects to recheck it immediately before showing this dialog.
Edited by Anders Kaseorg