[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

@@ -138,7 +138,8 @@ type Server struct {
jwtExtractor *jwt.ClaimsExtractor
jwtConfig *JWTConfig
suSupportsPty bool
suSupportsPty bool
loginIsUtilLinux bool
}
type JWTConfig struct {
@@ -193,6 +194,7 @@ func (s *Server) Start(ctx context.Context, addr netip.AddrPort) error {
}
s.suSupportsPty = s.detectSuPtySupport(ctx)
s.loginIsUtilLinux = s.detectUtilLinuxLogin(ctx)
ln, addrDesc, err := s.createListener(ctx, addr)
if err != nil {