'--wait' fails if created window is closed
gnome-terminal --wait
works as expected if the launched child process decides to quit (e.g. you type "exit" into the shell).
However, if the newly created window is killed by some window operation (clicking on its X, or File -> Close Tab etc.) then gnome-terminal --wait
waits endlessly.
Same happens in presence of a custom command, e.g. gnome-terminal --wait -- sleep 10
.