1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-02 02:22:06 -04:00

system update: general fixes to flatpak parsing

This commit is contained in:
bbedward
2026-04-29 16:14:19 -04:00
parent f76724f7cd
commit 86096db26b
11 changed files with 159 additions and 25 deletions

View File

@@ -8,6 +8,7 @@ import (
"os"
"os/exec"
"sync"
"syscall"
)
type RunOptions struct {
@@ -24,6 +25,13 @@ func Run(ctx context.Context, argv []string, opts RunOptions) error {
if len(opts.Env) > 0 {
cmd.Env = append(cmd.Environ(), opts.Env...)
}
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
cmd.Cancel = func() error {
if cmd.Process == nil {
return nil
}
return syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
}
stdout, err := cmd.StdoutPipe()
if err != nil {