diff options
author | Steve MacLean <sdmaclea@qti.qualcomm.com> | 2017-02-13 09:54:24 -0500 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-02-13 15:54:24 +0100 |
commit | 6185a8801d3d4402b3afb728856aa62b86dadb4a (patch) | |
tree | 809c8b5e365a80c37a0fd4704b6a65b56efc1da8 | |
parent | 199739614911b8f7c9cd672cdd8225e22700fa3f (diff) | |
download | coreclr-6185a8801d3d4402b3afb728856aa62b86dadb4a.tar.gz coreclr-6185a8801d3d4402b3afb728856aa62b86dadb4a.tar.bz2 coreclr-6185a8801d3d4402b3afb728856aa62b86dadb4a.zip |
[Unix] twowaypipe unlink before mkfifo (#9505)
Remove stale fifo when before mkfifo
This reduces bogus failures when corerun jobs were
killed with SIGKILL...
-rw-r--r-- | src/debug/debug-pal/unix/twowaypipe.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/debug/debug-pal/unix/twowaypipe.cpp b/src/debug/debug-pal/unix/twowaypipe.cpp index db4599aeb9..9dfe1e3ecb 100644 --- a/src/debug/debug-pal/unix/twowaypipe.cpp +++ b/src/debug/debug-pal/unix/twowaypipe.cpp @@ -24,11 +24,16 @@ bool TwoWayPipe::CreateServer(DWORD id) PAL_GetTransportPipeName(m_inPipeName, id, "in"); PAL_GetTransportPipeName(m_outPipeName, id, "out"); + unlink(m_inPipeName); + if (mkfifo(m_inPipeName, S_IRWXU) == -1) { return false; } + + unlink(m_outPipeName); + if (mkfifo(m_outPipeName, S_IRWXU) == -1) { unlink(m_inPipeName); |