xopen (version 1.0.0)

wait_for_finish: Wait for a process to finish

Description

With timeout(s), and interaction, if the session is interactive.

Usage

wait_for_finish(process, target, timeout1 = 2000, timeout2 = 5000)

Arguments

process

The process. It should not have stdout or stderr pipes, because that can make it freeze.

timeout1

Timeout before message.

timeout2

Timeout after message.

Details

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.