Mercurial > hg
changeset 28477:194a6cd873cd
chg: silently inherit server exit code
If chgserver aborts during startup, for example, error.ParseError when parsing
a config file, chg client probably just wants to exit with a same exit code
without printing other unrelated text. This patch changes the text "cmdserver
exited with status" from abortmsg to debugmsg and exits with a same exit code.
author | Jun Wu <quark@fb.com> |
---|---|
date | Fri, 11 Mar 2016 02:52:06 +0000 |
parents | e28dc6de38e7 |
children | e6e183687545 |
files | contrib/chg/chg.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/chg/chg.c Sun Mar 06 03:19:08 2016 +0530 +++ b/contrib/chg/chg.c Fri Mar 11 02:52:06 2016 +0000 @@ -252,7 +252,8 @@ cleanup: if (WIFEXITED(pst)) { - abortmsg("cmdserver exited with status %d", WEXITSTATUS(pst)); + debugmsg("cmdserver exited with status %d", WEXITSTATUS(pst)); + exit(WEXITSTATUS(pst)); } else if (WIFSIGNALED(pst)) { abortmsg("cmdserver killed by signal %d", WTERMSIG(pst)); } else {