]> git.tdb.fi Git - libs/core.git/commitdiff
Set correct mode in Pipe constructor
authorMikko Rasa <tdb@tdb.fi>
Wed, 30 May 2012 17:41:30 +0000 (17:41 +0000)
committerMikko Rasa <tdb@tdb.fi>
Wed, 30 May 2012 17:42:07 +0000 (17:42 +0000)
source/io/pipe.cpp

index 12f8fbd3886ea7f269b125691a19b2074ee16d11..3b74a0f2b6bea34ed7ca0a49991781de6331d6f8 100644 (file)
@@ -16,6 +16,8 @@ namespace IO {
 Pipe::Pipe():
        reader(read_handle, 1024)
 {
+       mode = M_RDWR;
+
 #ifdef WIN32
        string name = format("\\\\.\\pipe\\%u.%p", GetCurrentProcessId(), this);
        *read_handle = CreateNamedPipe(name.c_str(), PIPE_ACCESS_INBOUND|FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE, 1, 1024, 1024, 0, 0);