summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQingning Huo <qingninghuo@gmail.com>2011-09-04 10:29:02 (GMT)
committerQingning Huo <qingninghuo@gmail.com>2011-09-04 10:29:02 (GMT)
commit590c084d50652195518e764726f1a9db410f4104 (patch)
tree124469fcad6d0b1c91ccf96b28e8d2696e9ea4c5 /src
parent35db614cf7bd94bfd816a03a32b88286b8abdcd1 (diff)
downloadNinja-590c084d50652195518e764726f1a9db410f4104.zip
Ninja-590c084d50652195518e764726f1a9db410f4104.tar.gz
Ninja-590c084d50652195518e764726f1a9db410f4104.tar.bz2
subprocess-win32.cc: change named pipe names to contain process ID and subprocess object address.
Diffstat (limited to 'src')
-rw-r--r--src/subprocess-win32.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/subprocess-win32.cc b/src/subprocess-win32.cc
index 49ccfa8..acc2760 100644
--- a/src/subprocess-win32.cc
+++ b/src/subprocess-win32.cc
@@ -53,9 +53,9 @@ Subprocess::~Subprocess() {
}
HANDLE Subprocess::SetupPipe(HANDLE ioport) {
- char pipe_name[32];
+ char pipe_name[100];
snprintf(pipe_name, sizeof(pipe_name),
- "\\\\.\\pipe\\ninja_%p_out", ::GetModuleHandle(NULL));
+ "\\\\.\\pipe\\ninja_pid%u_sp%p", GetProcessId(GetCurrentProcess()), this);
pipe_ = ::CreateNamedPipeA(pipe_name,
PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED,