diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2013-06-12 13:45:17 +0900 |
---|---|---|
committer | Cedric Bail <cedric.bail@samsung.com> | 2013-06-14 16:38:18 +0900 |
commit | 07ef0fdd93d0c1fd0f0cb7c5638d6cba5dc96466 (patch) | |
tree | 2bc077266032fd90ac0fe6623d1555fc918e564c | |
parent | 82584a85fb9bd843a2fff671846846505f510ab6 (diff) | |
download | efl-07ef0fdd93d0c1fd0f0cb7c5638d6cba5dc96466.tar.gz |
evas/cserve2: Add UID to shm file path
+ Improve debug for corner case (never happened)
-rw-r--r-- | src/bin/evas/evas_cserve2_main_loop_linux.c | 5 | ||||
-rw-r--r-- | src/bin/evas/evas_cserve2_shm.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/evas/evas_cserve2_main_loop_linux.c b/src/bin/evas/evas_cserve2_main_loop_linux.c index 5222ab90d9..35c9d56578 100644 --- a/src/bin/evas/evas_cserve2_main_loop_linux.c +++ b/src/bin/evas/evas_cserve2_main_loop_linux.c @@ -258,7 +258,10 @@ _socketfd_setup(void) { if (connect(s, (struct sockaddr *)&socket_local, len) != -1) { - ERR("cserve2 service already there: \"%s\"", strerror(errno)); + if (errno == EADDRINUSE) + ERR("cserve2 service already there: \"%s\"", strerror(errno)); + else + ERR("cserve2 could connect the socket: %d \"%s\"", errno, strerror(errno)); close(s); return -1; } diff --git a/src/bin/evas/evas_cserve2_shm.c b/src/bin/evas/evas_cserve2_shm.c index 5e60138b42..99b7f25066 100644 --- a/src/bin/evas/evas_cserve2_shm.c +++ b/src/bin/evas/evas_cserve2_shm.c @@ -68,7 +68,7 @@ cserve2_shm_request(size_t size) } do { - snprintf(shmname, sizeof(shmname), "/evas-shm-img-%d", id++); + snprintf(shmname, sizeof(shmname), "/evas-shm-img-%x-%d", (int)getuid(), id++); fd = shm_open(shmname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); if (fd == -1 && errno != EEXIST) { |