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 Mon, Feb 01 2021, Johannes Sixt wrote:

> Am 01.02.21 um 16:44 schrieb Ævar Arnfjörð Bjarmason:
>> On Mon, Feb 01 2021, Vincent Lefevre wrote:
>>> On 2021-02-01 13:10:21 +0100, Ævar Arnfjörð Bjarmason:
>>>> So we've got the SIGPIPE to indicate the output wasn't fully
>>>> consumed.
>>>
>>> But the user doesn't care: he quit the pager because he didn't
>>> need more output. So there is no need to signal that the output
>>> wasn't fully consumed. The user already knew that before quitting
>>> the pager!
>> 
>> As noted above, this is assuming way too much about the functionality of
>> the pager command. We can get a SIGPIPE without the user's intent in
>> this way. Consider e.g. piping to some remote system via netcat.
>
> That assumption is warranted, IMO. Aren't _you_ stretching the meaning
> of "pager" too far here? A pager is intended for presentation to the
> user. If someone plays games with it, they should know what they get.

FWIW I replied to this in
https://lore.kernel.org/git/87r1lxeuoj.fsf@xxxxxxxxxxxxxxxxxxx/

Whatever anyone thinks of the virtues of passing down SIGHUP having e.g
a nc to a remote box be your pager isn't all that unusual.




[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