mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
test-terminal: set output terminals to raw mode
Not setting them to raw mode causes funny things to happen, such as \n -> \r\n translation: ./test-terminal.perl echo foo | xxd 0000000: 666f 6f0d 0a foo.. (Notice the added 0d.) To avoid this, set the (pseudo)terminal to raw mode. Note that the IO::Pty docs recommend doing it on both master and slave. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
0510480510
commit
a463aefa35
|
@ -69,6 +69,10 @@ sub copy_stdio {
|
|||
}
|
||||
my $master_out = new IO::Pty;
|
||||
my $master_err = new IO::Pty;
|
||||
$master_out->set_raw();
|
||||
$master_err->set_raw();
|
||||
$master_out->slave->set_raw();
|
||||
$master_err->slave->set_raw();
|
||||
my $pid = start_child(\@ARGV, $master_out->slave, $master_err->slave);
|
||||
close $master_out->slave;
|
||||
close $master_err->slave;
|
||||
|
|
Loading…
Reference in a new issue