Re: git fails with a broken pipe when one quits the pager

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021-01-31 04:36:52 +0100, Vincent Lefevre wrote:
> On 2021-01-31 02:47:59 +0100, Ævar Arnfjörð Bjarmason wrote:
> > On Fri, Jan 15 2021, Vincent Lefevre wrote:
> > > The broken pipe is internally expected, thus should not be reported
> > > by git.
> > >
> > > Just to be clear: this broken pipe should be discarded only when git
> > > uses its builtin pager feature, not with a general pipe, where the
> > > error may be important.
> > >
> > > For instance,
> > >
> > > $ { git log ; echo "Exit status: $?" >&2 ; } | true
> > >
> > > should still output
> > >
> > > Exit status: 141
> > 
> > I don't get it, how is it less meaningful when git itself invokes the
> > pager?
> 
> I don't understand your question. If I invoke the pager myself,
> I don't get a SIGPIPE:
> 
> cventin:~/software/gcc-trunk> git log
> cventin:~/software/gcc-trunk[PIPE]> git log|m
> cventin:~/software/gcc-trunk>

Well, more precisely, I mean that it is not reported. But
the SIGPIPE itself still occurs as expected, e.g. for scripts,
and one may choose to ignore it or not, as usual.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux