mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 07:04:37 +02:00
parent
39bde8078c
commit
37bd5ad800
@ -329,13 +329,16 @@ static BOOL CreatePipeOverlapped(HANDLE *outReadPipe, HANDLE *outWritePipe,
|
|||||||
if (size == 0)
|
if (size == 0)
|
||||||
size = 8192;
|
size = 8192;
|
||||||
|
|
||||||
|
int currentIndex;
|
||||||
|
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock lock(mutex);
|
boost::mutex::scoped_lock lock(mutex);
|
||||||
|
currentIndex = pipeIndex;
|
||||||
pipeIndex++;
|
pipeIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
char pipeName[128];
|
char pipeName[128];
|
||||||
sprintf(pipeName, "\\\\.\\Pipe\\OverlappedPipe.%d.%d", (int)GetCurrentProcessId(), pipeIndex);
|
sprintf(pipeName, "\\\\.\\Pipe\\OverlappedPipe.%d.%d", (int)GetCurrentProcessId(), currentIndex);
|
||||||
|
|
||||||
*outReadPipe = CreateNamedPipe(pipeName, PIPE_ACCESS_INBOUND | readMode,
|
*outReadPipe = CreateNamedPipe(pipeName, PIPE_ACCESS_INBOUND | readMode,
|
||||||
PIPE_TYPE_BYTE | PIPE_WAIT, 1, size, size, 60 * 1000, securityAttributes);
|
PIPE_TYPE_BYTE | PIPE_WAIT, 1, size, size, 60 * 1000, securityAttributes);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user