@matheusbsbs / matheus-bagliano / commits / 659288cd91
Fork 0

t/test-terminal: avoid non-inclusive language

In the ongoing effort to make the Git project a more inclusive place, let's try to avoid names like "master" where possible. In this instance, the use of the term `slave` is unfortunately enshrined in IO::Pty's API. We simply cannot avoid using that word here. But at least we can get rid of the usage of the word `master` and hope that IO::Pty will be eventually adjusted, too. Guessing that IO::Pty might follow Python's lead, we replace the name `master` by `parent` (hoping that IO::Pty will adopt the parent/child nomenclature, too). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Sep 21, 2020 at 22:01 UTC 659288cd9193a97d5f08c6ac090d58dfbdf6b345
1 file changed +16 -16
t/test-terminal.perl
+16 -16
@@ -81,24 +81,24 @@ if ($#ARGV < 1) {
81 die "usage: test-terminal program args";
82 }
83 $ENV{TERM} = 'vt100';
84 -my $master_in = new IO::Pty;
85 -my $master_out = new IO::Pty;
86 -my $master_err = new IO::Pty;
87 -$master_in->set_raw();
88 -$master_out->set_raw();
89 -$master_err->set_raw();
90 -$master_in->slave->set_raw();
91 -$master_out->slave->set_raw();
92 -$master_err->slave->set_raw();
93 -my $pid = start_child(\@ARGV, $master_in->slave, $master_out->slave, $master_err->slave);
94 -close $master_in->slave;
95 -close $master_out->slave;
96 -close $master_err->slave;
97 -my $in_pid = copy_stdin($master_in);
98 -copy_stdio($master_out, $master_err);
84 +my $parent_in = new IO::Pty;
85 +my $parent_out = new IO::Pty;
86 +my $parent_err = new IO::Pty;
87 +$parent_in->set_raw();
88 +$parent_out->set_raw();
89 +$parent_err->set_raw();
90 +$parent_in->slave->set_raw();
91 +$parent_out->slave->set_raw();
92 +$parent_err->slave->set_raw();
93 +my $pid = start_child(\@ARGV, $parent_in->slave, $parent_out->slave, $parent_err->slave);
94 +close $parent_in->slave;
95 +close $parent_out->slave;
96 +close $parent_err->slave;
97 +my $in_pid = copy_stdin($parent_in);
98 +copy_stdio($parent_out, $parent_err);
99 my $ret = finish_child($pid);
100 # If the child process terminates before our copy_stdin() process is able to
101 -# write all of its data to $master_in, the copy_stdin() process could stall.
101 +# write all of its data to $parent_in, the copy_stdin() process could stall.
102 # Send SIGTERM to it to ensure it terminates.
103 kill 'TERM', $in_pid;
104 finish_child($in_pid);