commandserver: send pgid in hello message
authorJun Wu <quark@fb.com>
Sun, 17 Jul 2016 22:56:05 +0100
changeset 29580 ee8186457516
parent 29579 43f3c0df2fab
child 29581 c66bc06f1bf6
commandserver: send pgid in hello message See the next patches for why we need it.
mercurial/commandserver.py
--- a/mercurial/commandserver.py	Sun Jul 17 11:28:01 2016 -0700
+++ b/mercurial/commandserver.py	Sun Jul 17 22:56:05 2016 +0100
@@ -282,6 +282,9 @@
         hellomsg += 'encoding: ' + encoding.encoding
         hellomsg += '\n'
         hellomsg += 'pid: %d' % util.getpid()
+        if util.safehasattr(os, 'getpgid'):
+            hellomsg += '\n'
+            hellomsg += 'pgid: %d' % os.getpgid(0)
 
         # write the hello msg in -one- chunk
         self.cout.write(hellomsg)