From: Tom Clegg Date: Mon, 4 Jan 2021 20:42:35 +0000 (-0500) Subject: 16306: Exit 0 when startup-then-shutdown goes as planned. X-Git-Tag: 2.2.0~141^2~20 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/6cd0e19a277812f302f46693d824cc17d17ed6b1 16306: Exit 0 when startup-then-shutdown goes as planned. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- 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