From 23d3c1593f078372c7e37fb7d2f70a2607973a34 Mon Sep 17 00:00:00 2001 From: Simon Persson Date: Tue, 20 Feb 2018 23:12:52 +0100 Subject: [PATCH] Just spawn event handlers, don't wait for exit code. --- src/player_event_handler.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/player_event_handler.rs b/src/player_event_handler.rs index 79b043ee..78827188 100644 --- a/src/player_event_handler.rs +++ b/src/player_event_handler.rs @@ -4,13 +4,12 @@ use librespot::playback::player::PlayerEvent; fn run_program(program: &str, env_vars: HashMap<&str, String>) { let mut v: Vec<&str> = program.split_whitespace().collect(); - info!("Running {:?}", v); - let status = Command::new(&v.remove(0)) + info!("Running {:?} with environment variables {:?}", v, env_vars); + Command::new(&v.remove(0)) .args(&v) .envs(env_vars.iter()) - .status() + .spawn() .expect("program failed to start"); - info!("Exit status: {}", status); } pub fn run_program_on_events(event: PlayerEvent, onevent: &str) {