tailssh: fix platform SFTP session teardown

This commit is contained in:
世界
2026-08-30 17:41:41 +08:00
parent b151c9e88d
commit 4b853215c6
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