tailssh: fix platform SFTP session teardown

This commit is contained in:
世界
2026-06-01 14:59:18 +08:00
parent 8ba1057c10
commit 36c8786df1
2 changed files with 8 additions and 2 deletions
@@ -41,6 +41,8 @@ func StartSocketpairProcess(shell string, args, env []string, dir string, uid, g
if err != nil {
return nil, nil, E.Cause(err, "socketpair")
}
syscall.CloseOnExec(fds[0])
syscall.CloseOnExec(fds[1])
childFile := os.NewFile(uintptr(fds[1]), "socketpair-child")
cmd := exec.Command(shell)
cmd.Args = args