feat: publish the Sandwich Hime source preview

Signed-off-by: Cole Speelman <gamertan@noreply.localhost>
This commit is contained in:
2026-08-11 20:15:06 -04:00
commit 9b29b3d7f8
100 changed files with 10989 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
// SPDX-License-Identifier: AGPL-3.0-only
//go:build !windows
package devserver
import (
"errors"
"os/exec"
"syscall"
)
func configureProcess(command *exec.Cmd) {
command.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
}
func attachProcessTree(_ *exec.Cmd) (uintptr, error) { return 0, nil }
func terminateProcess(command *exec.Cmd, _ uintptr) error {
if command.Process == nil {
return nil
}
if err := syscall.Kill(-command.Process.Pid, syscall.SIGTERM); err != nil && !errors.Is(err, syscall.ESRCH) {
return command.Process.Signal(syscall.SIGTERM)
}
return nil
}
func killProcess(command *exec.Cmd, _ uintptr) error {
if command.Process == nil {
return nil
}
if err := syscall.Kill(-command.Process.Pid, syscall.SIGKILL); err != nil && !errors.Is(err, syscall.ESRCH) {
return command.Process.Kill()
}
return nil
}
func cleanupProcess(command *exec.Cmd, processTree uintptr) error {
return killProcess(command, processTree)
}