From: Andreas Ericsson <ae@op5.se>
To: Dario Rodriguez <soft.d4rio@gmail.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>, Jeff King <peff@peff.net>,
Ben Walton <bwalton@artsci.utoronto.ca>,
git <git@vger.kernel.org>
Subject: Re: [PATCH/RFC] Fix for default pager
Date: Tue, 08 Jun 2010 23:33:53 +0200 [thread overview]
Message-ID: <4C0EB741.9020905@op5.se> (raw)
In-Reply-To: <AANLkTinB_SBilMOfgnHtDrQS-NBOLF4yY5NaP7ZvN9rK@mail.gmail.com>
On 06/08/2010 10:44 PM, Dario Rodriguez wrote:
> On Tue, Jun 8, 2010 at 3:59 PM, Johannes Sixt<j.sixt@viscovery.net> wrote:
>> Your repository has only 2 commits and its git log output is less than 1kB,
>> i.e., sufficiently small to fit in a pipe's buffer.
>>
>> git log calls start_command to fork() the pager. The OS's scheduler does not
>> run the newly forked process immediately; rather, git log goes on with its
>> own business, writing output to the pipe that connects to the pager. Because
>> your repository is so small, git log never has to wait that the pager drains
>> the pipe. git log finally reaches exit(0). At this time, an atexit() handler
>> (wait_for_pager()) finally calls finish_command() to wait for the pager.
>>
>> This is the first time that the forked child process can run. Only now it
>> turns out that the pager cannot be run. The child process closes the pipe
>> and exits with an error, but it is too late: wait_for_pager() drops the
>> error return code of finish_command() to the floor. The parent process (git
>> log) can complete with the exit code that it was given earlier, 0.
>>
>> Repeat your experiment with ./git log in git.git itself to see the
>> difference.
>>
>> -- Hannes
>>
>
> Capisco& touché, with much more than 1k of info, git show ends with a
> "Broken Pipe"... seems hard to detect for little, recently started
> projects since I added more than 60k of scripts and I need to do 'git
> show' to understand that the problem is a broken pipe.
>
> Now, let me think about it... do we need the pager_preexec function? I
> mean... it works fine without it, and the function is there because of
> a faulty 'less'.
>
> My problem is obvioulsly solved by adding PAGER=more in my default
> environment, but I think this could be a litle bit embarrassing for a
> new user, mostly in environments such this AIX :P
>
Catering to AIX by default seems stupid beyond belief. AIX users today
are, without fail, accustomed to having to tweak more or less everything
to make the system run smoothly with modern applications (where "modern"
is a generous term, including everything that's been written in the last
10 or so years).
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
next prev parent reply other threads:[~2010-06-08 21:34 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Installing on AIX fails>
2010-06-07 23:58 ` [PATCH/RFC] Fix for default pager Dario Rodriguez
2010-06-08 0:04 ` Ben Walton
2010-06-08 2:14 ` Dario Rodriguez
2010-06-08 5:35 ` Jeff King
2010-06-08 13:49 ` Dario Rodriguez
2010-06-08 14:17 ` Johannes Sixt
2010-06-08 14:39 ` Dario Rodriguez
2010-06-08 15:56 ` Johannes Sixt
2010-06-08 17:28 ` Dario Rodriguez
2010-06-08 18:59 ` Johannes Sixt
2010-06-08 20:44 ` Dario Rodriguez
2010-06-08 21:33 ` Andreas Ericsson [this message]
2010-06-09 9:08 ` Tor Arntsen
2010-06-09 9:29 ` Miles Bader
2010-06-10 8:29 ` Jeff King
2010-06-10 8:48 ` Tor Arntsen
2010-06-10 8:59 ` Jeff King
2010-06-10 9:24 ` Tor Arntsen
2010-06-10 11:31 ` Dario Rodriguez
2010-06-10 14:55 ` Junio C Hamano
2010-06-15 16:11 ` Brandon Casey
2010-06-15 16:32 ` Tor Arntsen
2010-06-16 1:34 ` Nazri Ramliy
2010-06-16 6:28 ` Jeff King
2010-06-09 18:57 ` Ævar Arnfjörð Bjarmason
2010-06-08 5:29 ` Jeff King
2010-06-08 6:12 ` Johannes Sixt
2010-06-08 12:24 ` Dario Rodriguez
2010-06-08 14:04 ` Erik Faye-Lund
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=4C0EB741.9020905@op5.se \
--to=ae@op5.se \
--cc=bwalton@artsci.utoronto.ca \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=peff@peff.net \
--cc=soft.d4rio@gmail.com \
/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).