[client] Use setsid to avoid the parent process from being killed via HUP by login (#4900)

This commit is contained in:
Viktor Liu
2025-12-05 03:29:27 +01:00
committed by GitHub
parent cb6b086164
commit f538e6e9ae
5 changed files with 71 additions and 8 deletions

View File

@@ -42,6 +42,11 @@ func (s *Server) detectSuPtySupport(context.Context) bool {
return false
}
// detectUtilLinuxLogin always returns false on JS/WASM
func (s *Server) detectUtilLinuxLogin(context.Context) bool {
return false
}
// executeCommandWithPty is not supported on JS/WASM
func (s *Server) executeCommandWithPty(logger *log.Entry, session ssh.Session, execCmd *exec.Cmd, privilegeResult PrivilegeCheckResult, ptyReq ssh.Pty, winCh <-chan ssh.Window) bool {
logger.Errorf("PTY command execution not supported on JS/WASM")