diff -r ee8186457516 -r c66bc06f1bf6 contrib/chg/hgclient.c --- a/contrib/chg/hgclient.c Sun Jul 17 22:56:05 2016 +0100 +++ b/contrib/chg/hgclient.c Sun Jul 17 23:05:59 2016 +0100 @@ -63,6 +63,7 @@ struct hgclient_tag_ { int sockfd; + pid_t pgid; pid_t pid; context_t ctx; unsigned int capflags; @@ -339,6 +340,8 @@ u = dataend; if (strncmp(s, "capabilities:", t - s + 1) == 0) { hgc->capflags = parsecapabilities(t + 2, u); + } else if (strncmp(s, "pgid:", t - s + 1) == 0) { + hgc->pgid = strtol(t + 2, NULL, 10); } else if (strncmp(s, "pid:", t - s + 1) == 0) { hgc->pid = strtol(t + 2, NULL, 10); } @@ -463,6 +466,12 @@ free(hgc); } +pid_t hgc_peerpgid(const hgclient_t *hgc) +{ + assert(hgc); + return hgc->pgid; +} + pid_t hgc_peerpid(const hgclient_t *hgc) { assert(hgc);