From: Jay Soffian Date: Mon, 30 Mar 2009 16:04:50 GMT Subject: Re: [PATCH 1/2] send-email: refactor and ensure prompting doesn't loop forever Message-ID: <76718490903300904k7e8c1054m99edb92d8d582387@mail.gmail.com> In-Reply-To: <76718490903300845x14897599jc73f50a16b21605d@mail.gmail.com> On Mon, Mar 30, 2009 at 11:45 AM, Jay Soffian wrote: > Okay, well, I figured out how to work the polish. Term::ReadLine is > attempting to use /dev/tty for input/output, which is closed. And > because send-email enables warnings, its attempt to do so emits the > messages you are seeing. Can you confirm that this patch squelches the > warnings? Ugh, not that. This: diff --git a/git-send-email.perl b/git-send-email.perl index f0405c8..81240ef 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -612,6 +612,9 @@ sub ask { my $default = $arg{default}; my $resp; my $i = 0; + return defined $default ? $default : undef + unless defined $term->IN and defined fileno($term->IN) and + defined $term->OUT and defined fileno($term->OUT); while ($i++ < 10) { $resp = $term->readline($prompt); if (!defined $resp) { # EOF j.