aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/execpath.h
blob: 6acb2776bde0397e4e0a0fb5bb1bba3c11ed2c15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

#include <util/generic/fwd.h>

// NOTE: This function has rare sporadic failures (throws exceptions) on FreeBSD. See REVIEW:54297
const TString& GetExecPath();
 
/** 
 * Get openable path to the binary currently being executed. 
 * 
 * The path does not match the original binary location, but stays openable even 
 * if the binary was moved or removed. 
 * 
 * On UNIX variants, utilizes the /proc FS. On Windows, equivalent to 
 * GetExecPath. 
 */ 
const TString& GetPersistentExecPath();