From 6cd0e19a277812f302f46693d824cc17d17ed6b1 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Mon, 4 Jan 2021 15:42:35 -0500 Subject: [PATCH] 16306: Exit 0 when startup-then-shutdown goes as planned. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- lib/boot/cmd.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/boot/cmd.go b/lib/boot/cmd.go index e0e2755220..373613bb35 100644 --- a/lib/boot/cmd.go +++ b/lib/boot/cmd.go @@ -108,6 +108,11 @@ func (bcmd bootCommand) run(ctx context.Context, prog string, args []string, std fmt.Fprintln(stdout, url) if *shutdown { super.Stop() + // Wait for children to exit. Don't report the + // ensuing "context cancelled" error, though: + // return nil to indicate successful startup. + _ = super.Wait() + return nil } } // Wait for signal/crash + orderly shutdown -- 2.39.5