Skip to content

Commit

Permalink
Merge pull request ninja-build#94 from qhuo/named-pipe
Browse files Browse the repository at this point in the history
subprocess-win32.cc: change named pipe names to contain process ID and subprocess object address.
  • Loading branch information
evmar committed Sep 4, 2011
2 parents 769bb7d + 590c084 commit e292718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/subprocess-win32.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e292718

Please sign in to comment.