[PATCH 3 of 3] chg: forward job control signals to worker process (issue5051)
Sean Farley
sean at farley.io
Thu Feb 11 20:05:28 UTC 2016
Yuya Nishihara <yuya at tcha.org> writes:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1453210319 -32400
> # Tue Jan 19 22:31:59 2016 +0900
> # Node ID 63251841f5f927f677b90957eec1230017f3a515
> # Parent def82508e22c33bdfe042fd372bddf6dc3f93e2c
> chg: forward job control signals to worker process (issue5051)
>
> This is necessary to suspend/resume long pulls, interactive curses session,
> etc.
>
> The implementation is based on emacsclient, but our version doesn't test if
> chg process is foreground or not before propagating SIGCONT. This is because
> chg isn't always an interactive session. If we copy the SIGTTIN/SIGTTOU
> emulation from emacsclient, non-interactive session can't be moved to a
> background job.
>
> $ chg pull
> ^Z
> suspended
> $ bg %1
> [1] continued
> [1] suspended (tty input) # wrong
>
> https://github.com/emacs-mirror/emacs/blob/0e96320/lib-src/emacsclient.c#L1094
Took me a while but I was finally able to verify the before behavior and
that these patches do indeed fix it. Great job, Yuya!
More information about the Mercurial-devel
mailing list