Mercurial > hg
diff contrib/chg/procutil.c @ 30690:e9ec42634ec8
chg: decouple hgclient from setupsignalhandler
procutil should not depend on hgclient. This patch makes the signal handling
part independent from hgclient.
author | Jun Wu <quark@fb.com> |
---|---|
date | Mon, 02 Jan 2017 14:04:35 +0000 |
parents | 9fa7255d4abd |
children | 7adb60660496 |
line wrap: on
line diff
--- a/contrib/chg/procutil.c Mon Jan 02 14:02:47 2017 +0000 +++ b/contrib/chg/procutil.c Mon Jan 02 14:04:35 2017 +0000 @@ -71,14 +71,11 @@ kill(peerpid, SIGPIPE); } -static void setupsignalhandler(const hgclient_t *hgc) +static void setupsignalhandler(pid_t pid, pid_t pgid) { - pid_t pid = hgc_peerpid(hgc); if (pid <= 0) return; peerpid = pid; - - pid_t pgid = hgc_peerpgid(hgc); peerpgid = (pgid <= 1 ? 0 : pgid); struct sigaction sa;