I'm thinking about having Pipe class as a base class with derived AnonymousPipe
and NamedPipe.
AnonymousPipe will be almost replica of existing Pipe class with custom
Open(OpenOptions opts) method.
NamedPipe will have following own methods:
enum OpenOptions
{
eOpenOptionNonBlocking = (1u << 0), // Non-blocking reads
eOpenChildProcessesInherit = (1u << 1) // Child processes inherit
};
```
explicit NamedPipe(const char* name);
bool Create(); //mkfifo
bool Delete(); //Close() & unlink
bool OpenReader(OpenOptions opts);
bool OpenWriter(OpenOptions opts);
```
For named pipes we don't need to have both reader & writer opened in the same
processes - so, that's why I think we may need separate open methods.
In order to read with timeout pipe should be opened in non-blocking mode - on
Windows you may use PIPE_NOWAIT if such option is set.
http://reviews.llvm.org/D6538
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits