Build tool for hunting down flakes

This commit is contained in:
Justine Tunney 2024-12-24 11:34:42 -08:00
parent 93e22c581f
commit 2de3845b25
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
10 changed files with 78 additions and 131 deletions

View file

@ -35,9 +35,8 @@ void shm_path_np(const char *name, char buf[hasatleast 78]) {
const char *a;
uint8_t digest[BLAKE2B256_DIGEST_LENGTH];
a = "/tmp/", n = 5;
if (IsLinux() && isdirectory("/dev/shm")) {
if (IsLinux() && isdirectory("/dev/shm"))
a = "/dev/shm/", n = 9;
}
BLAKE2B256(name, strlen(name), digest);
p = mempcpy(buf, a, n);
p = hexpcpy(p, digest, BLAKE2B256_DIGEST_LENGTH);