NOISSUE - Stop computation gracefully (#241)

* stop gracefully

Signed-off-by: Sammy Oina <sammyoina@gmail.com>

* use constant

Signed-off-by: Sammy Oina <sammyoina@gmail.com>

---------

Signed-off-by: Sammy Oina <sammyoina@gmail.com>
This commit is contained in:
Sammy Kerata Oina
2024-09-17 18:57:42 +03:00
committed by GitHub
parent c14a6338cc
commit 2f4ca414cb
2 changed files with 28 additions and 17 deletions
-11
View File
@@ -62,14 +62,3 @@ func RunCmdOutput(command string, args ...string) (string, error) {
return string(output), nil
}
// RunCmdStart starts the specified command and returns the *exec.Cmd for the running process.
func RunCmdStart(command string, args ...string) (*exec.Cmd, error) {
cmd := exec.Command(command, args...)
if err := cmd.Start(); err != nil {
return nil, fmt.Errorf("error starting command '%s': %s", cmd.String(), err)
}
return cmd, nil
}