Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 28027:14033c5dd261
util: enable getpid to be replaced
This will enable tests to write stable process ids.
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 03 Feb 2016 09:11:22 +0000 |
parents | d3f1b7ee5e70 |
children | ed4d06f180b8 |
comparison
equal
deleted
inserted
replaced
28026:a6db1163befa | 28027:14033c5dd261 |
---|---|
794 | 794 |
795 if initfn: | 795 if initfn: |
796 initfn() | 796 initfn() |
797 | 797 |
798 if not opts['daemon']: | 798 if not opts['daemon']: |
799 writepid(os.getpid()) | 799 writepid(util.getpid()) |
800 | 800 |
801 if opts['daemon_pipefds']: | 801 if opts['daemon_pipefds']: |
802 lockpath = opts['daemon_pipefds'] | 802 lockpath = opts['daemon_pipefds'] |
803 try: | 803 try: |
804 os.setsid() | 804 os.setsid() |