Hello Agl,
the upgrade will stop instantly once the terminal window is closed. This is because at the end of the upgrade, there is an additional question if to reboot now, and only after this has been entered the upgrade will do some final adjustments, and then reboot. With a closed window this would not be possible, so that why theupgrade terminates. You'd have to reopen another session, and start it from there again.
Hope that helps,
Andreas