mirror of
https://github.com/stashapp/stash.git
synced 2026-04-20 14:04:51 +02:00
21 lines
397 B
Go
21 lines
397 B
Go
// +build linux
|
|
|
|
package chromedp
|
|
|
|
import (
|
|
"os"
|
|
"os/exec"
|
|
"syscall"
|
|
)
|
|
|
|
func allocateCmdOptions(cmd *exec.Cmd) {
|
|
if _, ok := os.LookupEnv("LAMBDA_TASK_ROOT"); ok {
|
|
// do nothing on AWS Lambda
|
|
return
|
|
}
|
|
if cmd.SysProcAttr == nil {
|
|
cmd.SysProcAttr = new(syscall.SysProcAttr)
|
|
}
|
|
// When the parent process dies (Go), kill the child as well.
|
|
cmd.SysProcAttr.Pdeathsig = syscall.SIGKILL
|
|
}
|