15954: Don't return from Stop() until child processes end.
[arvados.git] / lib / boot / passenger.go
index 822e737cb972777466c12d0ed1eb9cda9a314148..21834dab26da3d1fc075d21ed42a7942806b868b 100644 (file)
@@ -90,7 +90,9 @@ func (runner runPassenger) Run(ctx context.Context, fail func(error), boot *Boot
        if err != nil {
                return fmt.Errorf("bug: no InternalURLs for component %q: %v", runner, runner.svc.InternalURLs)
        }
+       boot.waitShutdown.Add(1)
        go func() {
+               defer boot.waitShutdown.Done()
                err = boot.RunProgram(ctx, runner.src, nil, nil, "bundle", "exec",
                        "passenger", "start",
                        "-p", port,