From: Bart Van Assche Date: Sat, 13 Aug 2011 12:27:11 +0000 (+0000) Subject: vgdb: Unlink pipes and mapped file before (re)creating these. X-Git-Tag: svn/VALGRIND_3_7_0~265 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e952915190b453ea5364bf0d371ca0f824f5e041;p=thirdparty%2Fvalgrind.git vgdb: Unlink pipes and mapped file before (re)creating these. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11972 --- diff --git a/coregrind/m_gdbserver/remote-utils.c b/coregrind/m_gdbserver/remote-utils.c index 1e822634b8..022049c318 100644 --- a/coregrind/m_gdbserver/remote-utils.c +++ b/coregrind/m_gdbserver/remote-utils.c @@ -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);