Thread (38 messages) 38 messages, 5 authors, 2021-02-05

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

From: Johannes Sixt <hidden>
Date: 2021-02-01 22:17:13

Am 01.02.21 um 16:44 schrieb Ævar Arnfjörð Bjarmason:
On Mon, Feb 01 2021, Vincent Lefevre wrote:
quoted
On 2021-02-01 13:10:21 +0100, Ævar Arnfjörð Bjarmason:
quoted
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.

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help