@@ -87,24 +87,24 @@ class EditlineAdapter {
87
87
std::unique_ptr<lldb_private::Editline> _editline_sp;
88
88
89
89
PseudoTerminal _pty;
90
- int _pty_master_fd ;
90
+ int _pty_primary_fd ;
91
91
int _pty_secondary_fd;
92
92
93
93
std::unique_ptr<FilePointer> _el_secondary_file;
94
94
};
95
95
96
96
EditlineAdapter::EditlineAdapter ()
97
- : _editline_sp(), _pty(), _pty_master_fd (-1 ), _pty_secondary_fd(-1 ),
97
+ : _editline_sp(), _pty(), _pty_primary_fd (-1 ), _pty_secondary_fd(-1 ),
98
98
_el_secondary_file() {
99
99
lldb_private::Status error;
100
100
101
- // Open the first master pty available.
101
+ // Open the first primary pty available.
102
102
EXPECT_THAT_ERROR (_pty.OpenFirstAvailablePrimary (O_RDWR), llvm::Succeeded ());
103
103
104
- // Grab the master fd. This is a file descriptor we will:
104
+ // Grab the primary fd. This is a file descriptor we will:
105
105
// (1) write to when we want to send input to editline.
106
106
// (2) read from when we want to see what editline sends back.
107
- _pty_master_fd = _pty.GetPrimaryFileDescriptor ();
107
+ _pty_primary_fd = _pty.GetPrimaryFileDescriptor ();
108
108
109
109
// Open the corresponding secondary pty.
110
110
EXPECT_THAT_ERROR (_pty.OpenSecondary (O_RDWR), llvm::Succeeded ());
@@ -140,13 +140,13 @@ bool EditlineAdapter::SendLine(const std::string &line) {
140
140
141
141
// Write the line out to the pipe connected to editline's input.
142
142
ssize_t input_bytes_written =
143
- ::write (_pty_master_fd , line.c_str(),
143
+ ::write (_pty_primary_fd , line.c_str(),
144
144
line.length() * sizeof(std::string::value_type));
145
145
146
146
const char *eoln = " \n " ;
147
147
const size_t eoln_length = strlen (eoln);
148
148
input_bytes_written =
149
- ::write (_pty_master_fd , eoln, eoln_length * sizeof (char ));
149
+ ::write (_pty_primary_fd , eoln, eoln_length * sizeof (char ));
150
150
151
151
EXPECT_NE (-1 , input_bytes_written) << strerror (errno);
152
152
EXPECT_EQ (eoln_length * sizeof (char ), size_t (input_bytes_written));
@@ -205,7 +205,7 @@ bool EditlineAdapter::IsInputComplete(lldb_private::Editline *editline,
205
205
}
206
206
207
207
void EditlineAdapter::ConsumeAllOutput () {
208
- FilePointer output_file (fdopen (_pty_master_fd , " r" ));
208
+ FilePointer output_file (fdopen (_pty_primary_fd , " r" ));
209
209
210
210
int ch;
211
211
while ((ch = fgetc (output_file)) != EOF) {
0 commit comments