Skip to content

Commit

Permalink
windows fix
Browse files Browse the repository at this point in the history
  • Loading branch information
steebchen committed Feb 24, 2024
1 parent 4786b7d commit 7cdf933
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
5 changes: 1 addition & 4 deletions engine/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"os/exec"
"path"
"strings"
"syscall"
"time"

"github.com/joho/godotenv"
Expand Down Expand Up @@ -238,9 +237,7 @@ func (e *QueryEngine) spawn(file string) error {

e.cmd = exec.Command(file, "-p", port, "--enable-raw-queries")

e.cmd.SysProcAttr = &syscall.SysProcAttr{
Setpgid: true,
}
e.cmd.SysProcAttr = getSysProcAttr()

e.cmd.Stdout = os.Stdout

Expand Down
11 changes: 11 additions & 0 deletions engine/lifecycle_unix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//go:build !windows

package engine

import "syscall"

func getSysProcAttr() *syscall.SysProcAttr {
return &syscall.SysProcAttr{
Setpgid: true,
}
}
7 changes: 7 additions & 0 deletions engine/lifecycle_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package engine

import "syscall"

func getSysProcAttr() *syscall.SysProcAttr {
return &syscall.SysProcAttr{}
}

0 comments on commit 7cdf933

Please sign in to comment.