Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions internal/portforward/portforward.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,8 @@ func (m *Manager) Start(namespace, serviceName string, remotePort, preferredLoca

// Wait for port to be ready
if !m.waitTCPReady("127.0.0.1", localPort, 20.0) {
// Kill the process group
if cmd.Process != nil {
pgid, err := syscall.Getpgid(cmd.Process.Pid)
if err == nil {
syscall.Kill(-pgid, syscall.SIGTERM)
}
// TODO(ROX-34499): AFAICT this can get stuck forever if the process blocks SIGTERM...
cmd.Process.Kill()
cmd.Wait()
}
return "", fmt.Errorf("port-forward did not become ready")
Expand Down
Loading