@@ -66,19 +66,18 @@ PipeWindows::PipeWindows(pipe_t read, pipe_t write)
6666
6767PipeWindows::~PipeWindows () { Close (); }
6868
69- Status PipeWindows::CreateNew (bool child_process_inherit ) {
69+ Status PipeWindows::CreateNew () {
7070 // Even for anonymous pipes, we open a named pipe. This is because you
7171 // cannot get overlapped i/o on Windows without using a named pipe. So we
7272 // synthesize a unique name.
7373 uint32_t serial = g_pipe_serial.fetch_add (1 );
7474 std::string pipe_name = llvm::formatv (
7575 " lldb.pipe.{0}.{1}.{2}" , GetCurrentProcessId (), &g_pipe_serial, serial);
7676
77- return CreateNew (pipe_name.c_str (), child_process_inherit );
77+ return CreateNew (pipe_name.c_str ());
7878}
7979
80- Status PipeWindows::CreateNew (llvm::StringRef name,
81- bool child_process_inherit) {
80+ Status PipeWindows::CreateNew (llvm::StringRef name) {
8281 if (name.empty ())
8382 return Status (ERROR_INVALID_PARAMETER, eErrorTypeWin32);
8483
@@ -109,7 +108,7 @@ Status PipeWindows::CreateNew(llvm::StringRef name,
109108
110109 // Open the write end of the pipe. Note that closing either the read or
111110 // write end of the pipe could directly close the pipe itself.
112- Status result = OpenNamedPipe (name, child_process_inherit, false );
111+ Status result = OpenNamedPipe (name, false );
113112 if (!result.Success ()) {
114113 CloseReadFileDescriptor ();
115114 return result;
@@ -119,7 +118,6 @@ Status PipeWindows::CreateNew(llvm::StringRef name,
119118}
120119
121120Status PipeWindows::CreateWithUniqueName (llvm::StringRef prefix,
122- bool child_process_inherit,
123121 llvm::SmallVectorImpl<char > &name) {
124122 llvm::SmallString<128 > pipe_name;
125123 Status error;
@@ -133,7 +131,7 @@ Status PipeWindows::CreateWithUniqueName(llvm::StringRef prefix,
133131 pipe_name += " -" ;
134132 pipe_name += reinterpret_cast <char *>(unique_string);
135133 ::RpcStringFreeA (&unique_string);
136- error = CreateNew (pipe_name, child_process_inherit );
134+ error = CreateNew (pipe_name);
137135 } else {
138136 error = Status (status, eErrorTypeWin32);
139137 }
@@ -142,25 +140,22 @@ Status PipeWindows::CreateWithUniqueName(llvm::StringRef prefix,
142140 return error;
143141}
144142
145- Status PipeWindows::OpenAsReader (llvm::StringRef name,
146- bool child_process_inherit) {
143+ Status PipeWindows::OpenAsReader (llvm::StringRef name) {
147144 if (CanRead ())
148145 return Status (); // Note the name is ignored.
149146
150- return OpenNamedPipe (name, child_process_inherit, true );
147+ return OpenNamedPipe (name, true );
151148}
152149
153150llvm::Error PipeWindows::OpenAsWriter (llvm::StringRef name,
154- bool child_process_inherit,
155151 const Timeout<std::micro> &timeout) {
156152 if (CanWrite ())
157153 return llvm::Error::success (); // Note the name is ignored.
158154
159- return OpenNamedPipe (name, child_process_inherit, false ).takeError ();
155+ return OpenNamedPipe (name, false ).takeError ();
160156}
161157
162- Status PipeWindows::OpenNamedPipe (llvm::StringRef name,
163- bool child_process_inherit, bool is_read) {
158+ Status PipeWindows::OpenNamedPipe (llvm::StringRef name, bool is_read) {
164159 if (name.empty ())
165160 return Status (ERROR_INVALID_PARAMETER, eErrorTypeWin32);
166161
0 commit comments