Skip to content

Commit

Permalink
Do not set pdeathsig to the process on Lambda
Browse files Browse the repository at this point in the history
Since it's not supported by the AWS Lambda runtime

Fixes #562
  • Loading branch information
dcu authored and kenshaw committed Jan 16, 2021
1 parent f340f71 commit 7073d01
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions allocate_linux.go
Expand Up @@ -3,11 +3,18 @@
package chromedp

import (
"os"
"os/exec"
"syscall"
)

func allocateCmdOptions(cmd *exec.Cmd) {
_, isLambda := os.LookupEnv("LAMBDA_TASK_ROOT")
if isLambda {
// do nothing on AWS Lambda
return
}

if cmd.SysProcAttr == nil {
cmd.SysProcAttr = new(syscall.SysProcAttr)
}
Expand Down

0 comments on commit 7073d01

Please sign in to comment.