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.
--- 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 {