| 350 | static const char* s_program_path = "unknown"; |
| 351 | static char s_program_exec_path[PATH_MAX]; |
| 352 | static void CreateProgramPath() { |
| 353 | const ssize_t nr = butil::GetProcessAbsolutePath(s_program_exec_path, sizeof(s_program_exec_path) - 1); |
| 354 | if (nr > 0) { |
| 355 | s_program_exec_path[nr] = '\0'; |
| 356 | s_program_path = s_program_exec_path; |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | const char* GetProgramPath() { |
| 361 | pthread_once(&create_program_path_once, CreateProgramPath); |
nothing calls this directly
no test coverage detected