diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c --- a/contrib/chg/chg.c +++ b/contrib/chg/chg.c @@ -269,6 +269,9 @@ static hgclient_t *retryconnectcmdserver cleanup: if (WIFEXITED(pst)) { + if (WEXITSTATUS(pst) == 0) + abortmsg("could not connect to cmdserver " + "(exited with status 0)"); debugmsg("cmdserver exited with status %d", WEXITSTATUS(pst)); exit(WEXITSTATUS(pst)); } else if (WIFSIGNALED(pst)) {