-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract shared logic for matching on stdout line
Avoid repetition by introducing `wait_for_stdout_match` which reads from stdout until a match is found against the given pattern. Note: it's important that `child_stdout` lives long enough, until `sigint` is called on the child process. Otherwise the interrupt handler would try to `println!` to a dropped stdout and panic.
- Loading branch information
1 parent
9ebf027
commit 4f4432b
Showing
1 changed file
with
54 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters