Files
Steve Lohr 71b1964110 ignore if kill can't find pid that is already gone
we use this script inside a rootless-pod (https://github.com/moby/buildkit/blob/master/examples/kubernetes/pod.rootless.yaml) to perform our builds and call it via a CI/CD tool, which returns a non-zero exit code, as the trap cannot kill the process, as it is already gone, in case everything went fine

so we need to catch the error code from kill, which tries to kill a process that doesn't exist anymore and the suggestion is to just add || true, because we don't care about the exit code of kill

```
#17 DONE 4.2s
sh: can't kill pid 65: No such process
command terminated with exit code 1
```

Signed-off-by: Steve Lohr <schdief.law@gmail.com>
2022-08-08 12:23:41 +02:00
..