execpath.h 496 B

1234567891011121314151617
  1. #pragma once
  2. #include <util/generic/fwd.h>
  3. // NOTE: This function has rare sporadic failures (throws exceptions) on FreeBSD. See REVIEW:54297
  4. const TString& GetExecPath();
  5. /**
  6. * Get openable path to the binary currently being executed.
  7. *
  8. * The path does not match the original binary location, but stays openable even
  9. * if the binary was moved or removed.
  10. *
  11. * On UNIX variants, utilizes the /proc FS. On Windows, equivalent to
  12. * GetExecPath.
  13. */
  14. const TString& GetPersistentExecPath();