From: Johannes Sixt Date: Wed, 03 Feb 2021 17:19:12 GMT Subject: Re: [PATCH] pager: exit without error on SIGPIPE Message-ID: <160415b7-3196-7653-7417-4d5af97a2567@kdbg.org> In-Reply-To: Am 03.02.21 um 03:54 schrieb Junio C Hamano: > 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