Files
initrd/src/cmd/init_input.rs
T

16 lines
443 B
Rust
Raw Normal View History

2024-04-29 12:54:25 +02:00
use crate::input;
pub async fn run() {
tokio::spawn(async {
2025-11-20 09:11:12 +01:00
// give a bit of time for stdout
use tokio::time::{sleep, Duration};
sleep(Duration::from_millis(200)).await;
2024-04-29 12:54:25 +02:00
if let Err(e) = input::forward_requests_from_socket().await {
eprintln!("failed to forwards requests from socket: {e}");
std::process::exit(1);
}
});
input::answer_requests_from_stdin().await;
}