mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-19 20:14:17 -04:00
ociswrapper: do not panic if the process has already finished
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
@@ -90,7 +91,9 @@ func Start(envMap map[string]any) {
|
||||
func Stop() {
|
||||
err := cmd.Process.Kill()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
if !strings.HasSuffix(err.Error(), "process already finished") {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
}
|
||||
cmd.Wait()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user