tailssh: fix platform SFTP session teardown

This commit is contained in:
世界
2026-06-01 14:59:18 +08:00
parent ba2d6c6ba4
commit 5e5fd80d41
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