返回 DeepSeek-Reasonix
powershell_unix.go
根目录 / internal / persistentshell / powershell_unix.go
1 //go:build !windows
2
3 package persistentshell
4
5 import (
6 "net"
7 "os"
8 "os/exec"
9 "path/filepath"
10
11 "reasonix/internal/proc"
12 )
13
14 // .NET maps named pipes to these Unix sockets. This also permits exercising
15 // the same control protocol with pwsh in POSIX development environments.
16 func listenShellControl(name string) (net.Listener, error) {
17 return net.Listen("unix", filepath.Join(os.TempDir(), "CoreFxPipe_"+name))
18 }
19 func startShellTracked(cmd *exec.Cmd) (uintptr, error) {
20 proc.SetProcessGroupKill(cmd)
21 return proc.StartTracked(cmd)
22 }
23
23 lines GO