]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Made the semaphore name independent of the process ID.
authorBart Van Assche <bvanassche@acm.org>
Sun, 26 Jul 2009 09:16:29 +0000 (09:16 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 26 Jul 2009 09:16:29 +0000 (09:16 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10609

drd/tests/sem_open.c

index 0920001e8b8d2a30ea1772d9d07069a5439f83b3..1960704c4dcee4ceffdcc6bf9bf47c0a11b5001c 100644 (file)
@@ -58,7 +58,7 @@ int main(int argc, char** argv)
    * Use the ipcs and ipcrm commands to clean up named semaphores left by
    * aborted instances of this process.
    */
-  snprintf(semaphore_name, sizeof(semaphore_name), "sem_open-%d", getpid());
+  snprintf(semaphore_name, sizeof(semaphore_name), "drd-sem-open-test");
   s_sem = sem_open(semaphore_name, O_CREAT, 0600, 1);
   if (s_sem == SEM_FAILED)
   {