Open tsunghanliu opened 5 years ago
I found that the program use mkstemp()
to create random filenames. I write a tiny testing program and the path is still the same. So, the mkstemp series definitely needs an additional mapping.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
char path[64];
int fd;
strcpy(path, "/dev/shm/mkstemp-XXXXXX");
fd = mkstemp(path);
printf("fd: %d, path:%s\n", fd, path);
return 0;
}
I am using snapcraft-preload on Raspberry Pi 2. The program tried to create files in /dev/shm, but it failed. What I got from strace output:
For other regular file, I can see the redirecting works. For instance:
I'm not sure if I missed something. Could anyone please provide some suggestions?