]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
vgdb: Unlink pipes and mapped file before (re)creating these.
authorBart Van Assche <bvanassche@acm.org>
Sat, 13 Aug 2011 12:27:11 +0000 (12:27 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sat, 13 Aug 2011 12:27:11 +0000 (12:27 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11972

coregrind/m_gdbserver/remote-utils.c

index 1e822634b8a4e52c24aa4d68b0f762c83159bf79..022049c31833515922fa3cb2c94931691613d47e 100644 (file)
@@ -278,6 +278,15 @@ void remote_open (char *name)
 
    if (!mknod_done) {
       mknod_done++;
+
+      /*
+       * Unlink just in case a previous process with the same PID had been
+       * killed and hence Valgrind hasn't had the chance yet to remove these.
+       */
+      VG_(unlink)(from_gdb);
+      VG_(unlink)(to_gdb);
+      VG_(unlink)(shared_mem);
+
       safe_mknod(from_gdb);
       safe_mknod(to_gdb);