[PATCH] pager: exit cleanly on SIGPIPE (BC)

Yuya Nishihara yuya at tcha.org
Sat Feb 11 08:44:26 EST 2017


On Wed, 8 Feb 2017 07:47:39 -0800, Simon Farnsworth wrote:
> # HG changeset patch
> # User Simon Farnsworth <simonfar at fb.com>
> # Date 1486568650 28800
> #      Wed Feb 08 07:44:10 2017 -0800
> # Node ID d50cda2a403786836d1f0d5c99401599dc4f43ec
> # Parent  1f51b4658f21bbb797e922d155c1046eddccf91d
> pager: exit cleanly on SIGPIPE (BC)

Queued per reviews, thanks.

> Changeset aaa751585325 removes SIGPIPE handling completely. This is wrong,
> as it means that Mercurial does not exit when the pager does. Instead, raise
> SignalInterrupt when SIGPIPE happens with a pager attached, to trigger the
> normal exit path.

Your comment on V1 "it breaks `hg serve`" reminded me of the weirdness of
SIGPIPE. If we did send() in paged hg process for example, the process could
be killed by SIGPIPE. With this patch, we still have a similar problem, but
the process should exit cleanly.

http://stackoverflow.com/questions/108183/


More information about the Mercurial-devel mailing list