vgdb: Unlink pipes and mapped file before (re)creating these.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11972 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_gdbserver/remote-utils.c b/coregrind/m_gdbserver/remote-utils.c
index 1e82263..022049c 100644
--- a/coregrind/m_gdbserver/remote-utils.c
+++ b/coregrind/m_gdbserver/remote-utils.c
@@ -278,6 +278,15 @@
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);