Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commandserver.py @ 37123:a8a902d7176e
procutil: bulk-replace function calls to point to new module
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 24 Mar 2018 15:10:51 +0900 |
parents | d4a2e0d5d042 |
children | 4f742c2cb837 |
comparison
equal
deleted
inserted
replaced
37122:d4a2e0d5d042 | 37123:a8a902d7176e |
---|---|
286 def serve(self): | 286 def serve(self): |
287 hellomsg = 'capabilities: ' + ' '.join(sorted(self.capabilities)) | 287 hellomsg = 'capabilities: ' + ' '.join(sorted(self.capabilities)) |
288 hellomsg += '\n' | 288 hellomsg += '\n' |
289 hellomsg += 'encoding: ' + encoding.encoding | 289 hellomsg += 'encoding: ' + encoding.encoding |
290 hellomsg += '\n' | 290 hellomsg += '\n' |
291 hellomsg += 'pid: %d' % util.getpid() | 291 hellomsg += 'pid: %d' % procutil.getpid() |
292 if util.safehasattr(os, 'getpgid'): | 292 if util.safehasattr(os, 'getpgid'): |
293 hellomsg += '\n' | 293 hellomsg += '\n' |
294 hellomsg += 'pgid: %d' % os.getpgid(0) | 294 hellomsg += 'pgid: %d' % os.getpgid(0) |
295 | 295 |
296 # write the hello msg in -one- chunk | 296 # write the hello msg in -one- chunk |
455 self._socketunlinked = None | 455 self._socketunlinked = None |
456 | 456 |
457 def init(self): | 457 def init(self): |
458 self._sock = socket.socket(socket.AF_UNIX) | 458 self._sock = socket.socket(socket.AF_UNIX) |
459 self._servicehandler.bindsocket(self._sock, self.address) | 459 self._servicehandler.bindsocket(self._sock, self.address) |
460 if util.safehasattr(util, 'unblocksignal'): | 460 if util.safehasattr(procutil, 'unblocksignal'): |
461 util.unblocksignal(signal.SIGCHLD) | 461 procutil.unblocksignal(signal.SIGCHLD) |
462 o = signal.signal(signal.SIGCHLD, self._sigchldhandler) | 462 o = signal.signal(signal.SIGCHLD, self._sigchldhandler) |
463 self._oldsigchldhandler = o | 463 self._oldsigchldhandler = o |
464 self._socketunlinked = False | 464 self._socketunlinked = False |
465 | 465 |
466 def _unlinksocket(self): | 466 def _unlinksocket(self): |