chg: do not redirect stdout to /dev/null
Redirecting stdout to /dev/null has unwanted side effects, namely ui.write
will stop working. This patch removes the redirection code and helps chg to
pass test-bad-extension.t.
--- a/contrib/chg/chg.c Mon Mar 14 15:03:19 2016 +0000
+++ b/contrib/chg/chg.c Mon Mar 14 15:05:25 2016 +0000
@@ -294,12 +294,6 @@
if (pid == 0) {
/* do not leak lockfd to hg */
close(opts->lockfd);
- /* bypass uisetup() of pager extension */
- int nullfd = open("/dev/null", O_WRONLY);
- if (nullfd >= 0) {
- dup2(nullfd, fileno(stdout));
- close(nullfd);
- }
execcmdserver(opts);
} else {
hgc = retryconnectcmdserver(opts, pid);