| 334 | static const char* s_program_name = "unknown"; |
| 335 | static char s_cmdline[256]; |
| 336 | static void CreateProgramName() { |
| 337 | const ssize_t nr = butil::ReadCommandLine(s_cmdline, sizeof(s_cmdline) - 1, false); |
| 338 | if (nr > 0) { |
| 339 | s_cmdline[nr] = '\0'; |
| 340 | s_program_name = s_cmdline; |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | const char* GetProgramName() { |
| 345 | pthread_once(&create_program_name_once, CreateProgramName); |
nothing calls this directly
no test coverage detected