Skip to content

Commit

Permalink
Ignore SIGQUIT in the networking process, let it gracefully close whe…
Browse files Browse the repository at this point in the history
…n the parent closes. (#47515)
  • Loading branch information
Joerger authored Oct 16, 2024
1 parent cce1157 commit 4c76609
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/srv/reexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,12 @@ func (o *osWrapper) startNewParker(ctx context.Context, credential *syscall.Cred
}

func RunNetworking() (errw io.Writer, code int, err error) {
// SIGQUIT is used by teleport to initiate graceful shutdown, waiting for
// existing exec sessions to close before ending the process. For this to
// work when closing the entire teleport process group, exec sessions must
// ignore SIGQUIT signals.
signal.Ignore(syscall.SIGQUIT)

// errorWriter is used to return any error message back to the client.
// Use stderr so that it's not forwarded to the remote client.
errorWriter := os.Stderr
Expand Down

0 comments on commit 4c76609

Please sign in to comment.