From 16f2f262366621cab37c51caba2143179f8b82ff Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Mon, 19 Sep 2022 17:30:57 -0400 Subject: [PATCH] Updated the start command to not wait on the server process --- src/cmd/start.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cmd/start.rs b/src/cmd/start.rs index 6f04a78..af85923 100644 --- a/src/cmd/start.rs +++ b/src/cmd/start.rs @@ -1,4 +1,4 @@ -use std::process::Command; +use std::process::{Command, Stdio}; pub fn start_command(server_name: &str) -> Result<(), Box> { println!("Starting server {}.", server_name); @@ -16,7 +16,11 @@ pub fn start_command(server_name: &str) -> Result<(), Box } // run the start command - Command::new(script_file_path).output()?; + Command::new(script_file_path) + .stdin(Stdio::null()) + .stdout(Stdio::null()) + .stderr(Stdio::null()) + .spawn()?; // return okay signal Ok(())