| 344 | } |
| 345 | |
| 346 | bool getCurrentModulePath(char* buffer, size_t bufferSize) |
| 347 | { |
| 348 | #ifdef HAVE_DLADDR |
| 349 | Dl_info path; |
| 350 | |
| 351 | if (dladdr((void*) &getCurrentModulePath, &path)) |
| 352 | { |
| 353 | strncpy(buffer, path.dli_fname, bufferSize); |
| 354 | return true; |
| 355 | } |
| 356 | #endif |
| 357 | |
| 358 | return false; |
| 359 | } |
| 360 | |
| 361 | // setting flag is not absolutely required, therefore ignore errors here |
| 362 | void setCloseOnExec(int fd) |
no outgoing calls
no test coverage detected