The cib configuration setting max_run_time didn’t always work, because its implementation only killed the adapter, not any child processes of the adapter. We fix this by running the adapter in its own process group, and killing the whole group if the time runs out.
In addition, the timeoutcmd.rs module (and the ChildProcess type) is simplified, by making the deadline mandatory. It is no longer possible to run an adapter without a timeout. This makes sense, as it’d not be useful to allow an adapter to run indefinitely. The old behavior can be simulated by setting a very long timeout, such as a year.
Signed-off-by: Lars Wirzenius liw@liw.fi
The cib configuration setting max_run_time didn’t always work, because its implementation only killed the adapter, not any child processes of the adapter. We fix this by running the adapter in its own process group, and killing the whole group if the time runs out.
In addition, the timeoutcmd.rs module (and the ChildProcess type) is simplified, by making the deadline mandatory. It is no longer possible to run an adapter without a timeout. This makes sense, as it’d not be useful to allow an adapter to run indefinitely. The old behavior can be simulated by setting a very long timeout, such as a year.
Signed-off-by: Lars Wirzenius liw@liw.fi