Function hydroflow::util::wait_for_process_output
source · pub fn wait_for_process_output(
output_so_far: &mut String,
output: &mut ChildStdout,
wait_for: &str,
)
Expand description
Waits for a specific process output before returning.
When a child process is spawned often you want to wait until the child process is ready before moving on. One way to do that synchronization is by waiting for the child process to output something and match regex against that output. For example, you could wait until the child process outputs “Client live!” which would indicate that it is ready to receive input now on stdin.