Obsolete
/
libipc-old
Archived
3
0
Fork 0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
libipc-old/src/service_path.c

20 lines
396 B
C

#include "ipc.h"
struct ipc_error
service_path (char *path, const char *sname)
{
T_R ((path == NULL), IPC_ERROR_SERVICE_PATH__NO_PATH);
T_R ((sname == NULL), IPC_ERROR_SERVICE_PATH__NO_SERVICE_NAME);
memset (path, 0, PATH_MAX);
char *rundir = getenv ("IPC_RUNDIR");
if (rundir == NULL)
rundir = RUNDIR;
snprintf (path, PATH_MAX - 1, "%s/%s", rundir, sname);
IPC_RETURN_NO_ERROR;
}