changeset 30691 | 7adb60660496 |
parent 30690 | e9ec42634ec8 |
child 30692 | 23ddd43ba866 |
--- a/contrib/chg/chg.c Mon Jan 02 14:04:35 2017 +0000 +++ b/contrib/chg/chg.c Mon Jan 02 14:10:32 2017 +0000 @@ -430,7 +430,10 @@ } setupsignalhandler(hgc_peerpid(hgc), hgc_peerpgid(hgc)); - pagerpid = setuppager(hgc, argv + 1, argc - 1); + const char *pagercmd = hgc_getpager(hgc, argv + 1, argc - 1); + pagerpid = setuppager(pagercmd); + if (pagerpid) + hgc_attachio(hgc); /* reattach to pager */ int exitcode = hgc_runcommand(hgc, argv + 1, argc - 1); restoresignalhandler(); hgc_close(hgc);