Start xdg-open in new process group (fixes #164)

This commit is contained in:
Jakob Borg 2014-05-02 08:53:05 +02:00
parent 1e92c47960
commit ed476271a6
1 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,7 @@ package main
import (
"os/exec"
"runtime"
"syscall"
)
func openURL(url string) error {
@ -30,5 +31,9 @@ func openURL(url string) error {
return exec.Command("open", url).Run()
}
return exec.Command("xdg-open", url).Run()
cmd := exec.Command("xdg-open", url)
cmd.SysProcAttr = &syscall.SysProcAttr{
Setpgid: true,
}
return cmd.Run()
}