mercurial/commandserver.py
changeset 40635 9683dfb6f13a
parent 40361 b7de186efd82
child 40636 054d0fcba2c4
equal deleted inserted replaced
40634:5542bc9125c9 40635:9683dfb6f13a
   318     def run(self):
   318     def run(self):
   319         ui = self.ui
   319         ui = self.ui
   320         # redirect stdio to null device so that broken extensions or in-process
   320         # redirect stdio to null device so that broken extensions or in-process
   321         # hooks will never cause corruption of channel protocol.
   321         # hooks will never cause corruption of channel protocol.
   322         with procutil.protectedstdio(ui.fin, ui.fout) as (fin, fout):
   322         with procutil.protectedstdio(ui.fin, ui.fout) as (fin, fout):
       
   323             sv = server(ui, self.repo, fin, fout)
   323             try:
   324             try:
   324                 sv = server(ui, self.repo, fin, fout)
       
   325                 return sv.serve()
   325                 return sv.serve()
   326             finally:
   326             finally:
   327                 sv.cleanup()
   327                 sv.cleanup()
   328 
   328 
   329 def _initworkerprocess():
   329 def _initworkerprocess():