Skip to content

Commit

Permalink
[supervisor] Close docker unix socket on termination
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Aug 20, 2021
1 parent 58f0b33 commit 1590234
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/supervisor/pkg/supervisor/supervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,14 @@ func socketActivationForDocker(ctx context.Context, wg *sync.WaitGroup, term *te
l, err := net.Listen("unix", fn)
if err != nil {
log.WithError(err).Error("cannot provide Docker activation socket")
return
}

go func() {
<-ctx.Done()
l.Close()
}()

_ = os.Chown(fn, gitpodUID, gitpodGID)
err = activation.Listen(ctx, l, func(socketFD *os.File) error {
cmd := exec.Command("docker-up")
Expand Down

0 comments on commit 1590234

Please sign in to comment.