Re: [PATCH] pager: exit without error on SIGPIPE
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Feb 3, 2021, 17:19 UTC
- Message-ID
- <160415b7-3196-7653-7417-4d5af97a2567@kdbg.org>
- In-Reply-To
- <xmqq35ydeu94.fsf@gitster.c.googlers.com>
Am 03.02.21 um 03:54 schrieb Junio C Hamano:
Show 7 quoted lines
> I guess we just want to take just a half of your [WIP/PATCH v2 5/5], > ignoring the return values from finish_command*() and exiting with 0 > when we got SIGPIPE (that would mean that there will be no change on > the atexit codepath). Unlike Denton's change directly on the current > codebase, the resulting code would clearly show that we only care about > the signal codepath, thanks to the refactoring [PATCH v2 1/5] has > done.
Note though, that we cannot call exit() from a signal handler: it is not async-signal safe.
https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03
-- Hannes