With timeout(s), and interaction, if the session is interactive.
wait_for_finish(process, target, timeout1 = 2000, timeout2 = 5000)
The process. It should not have stdout
or stderr
pipes, because that can make it freeze.
Timeout before message.
Timeout after message.
First we wait for 2s. If the process is still alive, then we give it another 5s, but first let the user know that they can interrupt the process.