~exec64/imv

ref: 4c0123bb3b449a2ea45b3e831db725d853bb03a1 imv/src/ipc_common.c -rw-r--r-- 250 bytes
4c0123bb — Harry Jeffery Release v4.0.1 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "ipc.h"

#include <stdio.h>
#include <stdlib.h>

void imv_ipc_path(char *buf, size_t len, int pid)
{
  const char *base = getenv("XDG_RUNTIME_DIR");
  if (!base) {
    base = "/tmp";
  }
  snprintf(buf, len, "%s/imv-%d.sock", base, pid);
}