telemetry: don't log.Fatal if os.Executable returned an error It's possible for os.Executable to fail to find the path to the executable. This can happen for instance on AIX if os.Args[0] is not an absolute path and we can't find it in PATH. For #66344 Change-Id: Ief083e022a7140b228c62a5e703985e7b199561f Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/574815 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/start.go b/start.go index 661c912..6c88992 100644 --- a/start.go +++ b/start.go
@@ -112,7 +112,11 @@ // Fork+exec the telemetry child. exe, err := os.Executable() if err != nil { - log.Fatal(err) + // There was an error getting os.Executable. It's possible + // for this to happen on AIX if os.Args[0] is not an absolute + // path and we can't find os.Args[0] in PATH. + log.Printf("failed to start telemetry sidecar: os.Executable: %v", err) + return } cmd := exec.Command(exe, "** telemetry **") // this unused arg is just for ps(1) daemonize(cmd)