How mimic ^C programatically for Command::new(&cmd[0])...spawn()?

⚓ rust    📅 2025-05-09    👤 surdeus    👁️ 6      

surdeus

Warning

This post was published 53 days ago. The information described in this article may have changed.

I can terminate Rust program from a terminal pressing ^C. However when I run the same program using Rust command, I do not know how to do that. It's possible to look in source of Rust terminal, however to save some time, maybe someone already implemented that and can help me?

When I was writing the question, I thought, maybe I need just send 03 to stdin? Let me check.

2 posts - 2 participants

Read full topic

🏷️ rust_feed