Im writing an application in Rust that checks for certain processes. I know it's possible to get a list of running processes, but i rather not create an infinite loop to poll them.
Is there an event that gets triggered when a process is started?
Im writing an application in Rust that checks for certain processes. I know it's possible to get a list of running processes, but i rather not create an infinite loop to poll them.
Is there an event that gets triggered when a process is started?
Rust can't do anything that the OS doesn't already provide, and Rust doesn't have its own runtime, so you can just use whatever the OS offers.
When there isn't already a crate for some thing, the problem boils down to: How would you do that in C? Find answer to that, and then use Rust's FFI (or some lower-level sys crate like winapi
to call that.