php/services_windows.go
Claude 6cb5957ca6
feat: extract PHP/Laravel commands from core/cli
Port all PHP command files from core/cli internal/cmd/php/ into a
standalone module. Inlines workspace dependency to avoid cross-module
internal imports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:40:59 +00:00

34 lines
756 B
Go

//go:build windows
package php
import (
"os"
"os/exec"
)
// setSysProcAttr sets Windows-specific process attributes.
// Windows doesn't support Setpgid, so this is a no-op.
func setSysProcAttr(cmd *exec.Cmd) {
// No-op on Windows - process groups work differently
}
// signalProcessGroup sends a termination signal to the process.
// On Windows, we can only signal the main process, not a group.
func signalProcessGroup(cmd *exec.Cmd, sig os.Signal) error {
if cmd.Process == nil {
return nil
}
return cmd.Process.Signal(sig)
}
// termSignal returns os.Interrupt for Windows (closest to SIGTERM).
func termSignal() os.Signal {
return os.Interrupt
}
// killSignal returns os.Kill for Windows.
func killSignal() os.Signal {
return os.Kill
}