os_rel2abs_path() function
os_rel2abs_path - Get an absolute path for a file @rel_path: Relative path to a file Returns: Absolute path for the file or %NULL on failure This function tries to convert a relative path of a file to an absolute path in order for the file to be found even if current working directory has changed. The returned value is allocated and caller is responsible for freeing it. It is acceptable to just return the same path in an allocated buffer, e.g., return strdup(rel_path). This function is only used to find configuration files when os_daemonize() may have changed the current working directory and relative path would be pointing to a different location.
Syntax
char * os_rel2abs_path(const char *rel_path);