(command: &str, flag: &str)
| 1765 | } |
| 1766 | |
| 1767 | fn command_arg_after(command: &str, flag: &str) -> Option<String> { |
| 1768 | let marker = format!(" {flag} "); |
| 1769 | let start = command.find(&marker)? + marker.len(); |
| 1770 | let value = &command[start..]; |
| 1771 | let end = value.find(" --").unwrap_or(value.len()); |
| 1772 | Some(value[..end].trim().to_owned()).filter(|value| !value.is_empty()) |
| 1773 | } |
| 1774 | |
| 1775 | fn terminate_process_group(pid: u32, timeout: Duration) { |
| 1776 | terminate_process_group_with_kill_timeout(pid, timeout, Duration::from_secs(2)); |
no test coverage detected