-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mesh-init: fix executable copy when dynamic linker is used
When using dynamic linking (e.g. Cgo) during compilation, the `consul-ecs` process will be started by calling the linker to launch the actual Go executable. This causes `os.Executable()` to return the linker rather than the program itself. When self-copying in the `mesh-init` command, check for dynamic linker use. If detected, fall back to a path-based executable resolution derived from `os.Argv[0]`, which should provide the name of the real executable file +/- its path.
- Loading branch information
Showing
3 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters