Skip to content

Commit

Permalink
Kill env cmd as a last resource (#18712)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanp413 authored Sep 14, 2023
1 parent 5cb145e commit 6c1575f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/ide/jetbrains/launcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,9 @@ func resolveUserEnvs() (userEnvs []string, err error) {
envCmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
envCmd.Stderr = os.Stderr
envCmd.WaitDelay = 3 * time.Second
time.AfterFunc(8*time.Second, func() {
_ = syscall.Kill(-envCmd.Process.Pid, syscall.SIGKILL)
})

output, err := envCmd.Output()
if errors.Is(err, exec.ErrWaitDelay) {
Expand Down

0 comments on commit 6c1575f

Please sign in to comment.