From: Thomas Rast <trast@student.ethz.ch>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
Jeff King <peff@peff.net>,
Michael Haggerty <mhagger@alum.mit.edu>
Subject: Re: [PATCH 2/3] test-terminal: set output terminals to raw mode
Date: Mon, 12 Dec 2011 20:01:35 +0100 [thread overview]
Message-ID: <201112122001.36303.trast@student.ethz.ch> (raw)
In-Reply-To: <20111212182318.GE31793@elie.hsd1.il.comcast.net>
Jonathan Nieder wrote:
> Thomas Rast wrote:
>
> > Not setting them to raw mode causes funny things to happen, such as
> > \n -> \r\n translation:
> [...]
> > To avoid this, set the (pseudo)terminal to raw mode. Note that the
> > IO::Pty docs recommend doing it on both master and slave.
>
> Good idea, so for what it's worth,
> Acked-by: Jonathan Nieder <jrnieder@gmail.com>
>
> Does this change the behavior in
> <https://rt.cpan.org/Ticket/Display.html?id=65692> (oh please oh
> please)?
I don't think so. I tested this tweak of the script:
perl -MIO::Pty -MFile::Copy -e '
for (my $i = 0;; $i++) {
my $master = new IO::Pty;
my $slave = $master->slave;
$master->set_raw();
$slave->set_raw();
if (fork == 0) {
close $master or die "close: $!";
open STDOUT, ">&", $slave or die "dup2: $!";
close $slave or die "close: $!";
exec("echo", "hi", $i) or die "exec: $!";
}
close $slave or die "close: $!";
copy($master, \*STDOUT) or die "copy: $!";
close $master or die "close: $!"; wait;
}
'
That's over ssh on
$ uname -a
Darwin mackeller.inf.ethz.ch 11.1.0 Darwin Kernel Version 11.1.0: Tue Jul 26 16:07:11 PDT 2011; root:xnu-1699.22.81~1/RELEASE_X86_64 x86_64
What's odd is that when I was logged in at university (over Gbit
ethernet, but still over ssh), the unmodified version wouldn't even
get off the ground. I may just have been dreaming however.
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2011-12-12 19:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-12 18:09 [PATCH 1/3] test-terminal: give the child an empty stdin TTY Thomas Rast
2011-12-12 18:09 ` [PATCH 2/3] test-terminal: set output terminals to raw mode Thomas Rast
2011-12-12 18:23 ` Jonathan Nieder
2011-12-12 19:01 ` Thomas Rast [this message]
2011-12-13 5:09 ` Jonathan Nieder
2011-12-12 18:09 ` [PATCH 3/3] t/lib-terminal: test test-terminal's sanity Thomas Rast
2011-12-12 18:25 ` Jonathan Nieder
2011-12-12 18:19 ` [PATCH 1/3] test-terminal: give the child an empty stdin TTY Jonathan Nieder
2011-12-12 18:34 ` Thomas Rast
2011-12-12 19:05 ` Jonathan Nieder
2011-12-12 20:06 ` Junio C Hamano
2011-12-12 19:07 ` Junio C Hamano
2011-12-12 19:14 ` Thomas Rast
2011-12-12 19:16 ` Jeff King
2011-12-12 20:38 ` Junio C Hamano
2011-12-12 23:25 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201112122001.36303.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=mhagger@alum.mit.edu \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).