summaryrefslogtreecommitdiff
path: root/src/bin/evas/evas_cserve2_shm.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-10-08 17:06:33 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:16 +0900
commit660ad6e4a414c42364ab555f6f77354a97d04610 (patch)
tree0b421772d693328b40a08030a19b0ad765bbaadf /src/bin/evas/evas_cserve2_shm.c
parent6b6e33e262387380af4507e94a123a352ac6ee1c (diff)
evas/cserve2: Add PID to shm filenames
This will help identify new memory pools in case cserve2 restarts and reloads the same glyphs for instance.
Diffstat (limited to 'src/bin/evas/evas_cserve2_shm.c')
-rw-r--r--src/bin/evas/evas_cserve2_shm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/evas/evas_cserve2_shm.c b/src/bin/evas/evas_cserve2_shm.c
index 2df0bb5e60..2045cdd8ca 100644
--- a/src/bin/evas/evas_cserve2_shm.c
+++ b/src/bin/evas/evas_cserve2_shm.c
@@ -77,8 +77,8 @@ cserve2_shm_request(const char *infix, size_t size)
77 } 77 }
78 78
79 do { 79 do {
80 snprintf(shmname, sizeof(shmname), "/evas-shm-%x-%s-%08x", 80 snprintf(shmname, sizeof(shmname), "/evas-shm-%05d-%05d-%s-%08x",
81 (int) getuid(), infix, ++id); 81 (int) getuid(), (int) getpid(), infix, ++id);
82 fd = shm_open(shmname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); 82 fd = shm_open(shmname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
83 if (fd == -1 && errno != EEXIST) 83 if (fd == -1 && errno != EEXIST)
84 { 84 {
@@ -304,7 +304,7 @@ _cserve2_shm_cleanup()
304 const Eina_File_Direct_Info *f_info; 304 const Eina_File_Direct_Info *f_info;
305 char pattern[NAME_MAX]; 305 char pattern[NAME_MAX];
306 306
307 sprintf(pattern, "evas-shm-%x-", (int) getuid()); 307 sprintf(pattern, "evas-shm-%05d-", (int) getuid());
308 iter = eina_file_direct_ls("/dev/shm"); 308 iter = eina_file_direct_ls("/dev/shm");
309 EINA_ITERATOR_FOREACH(iter, f_info) 309 EINA_ITERATOR_FOREACH(iter, f_info)
310 { 310 {