[Git][pacman/pacman][master] util: Flush cursor state to stdout before removing signal handler