i currently execute a shell command as follows:
let mut this_command = Command::new(my_cmd); let this_child = Arc::new(SharedChild::spawn(&mut this_command).unwrap()); this_child.wait().unwrap();
i need to possibly kill this command in another thread. hence my use of shared_child.
but i'd like to have
my_cmd use pipes and redirection. cmd_lib has nice macros to spawn e.g.
ls | grep > foo. but it is not documented there or in shared_lib how to combine the two.
is there a way to do something like
SharedChild:spawn(run_cmd!(ls | grep > foo)) ?
i'm new to rust as of two weeks ago so please go easy on me.