##// END OF EJS Templates
server: use tryunlink
Ryan McElroy -
r31548:ce4ddcda default
parent child Browse files
Show More
@@ -7,7 +7,6 b''
7
7
8 from __future__ import absolute_import
8 from __future__ import absolute_import
9
9
10 import errno
11 import os
10 import os
12 import sys
11 import sys
13 import tempfile
12 import tempfile
@@ -60,11 +59,7 b' def runservice(opts, parentfn=None, init'
60 raise error.Abort(_('child process failed to start'))
59 raise error.Abort(_('child process failed to start'))
61 writepid(pid)
60 writepid(pid)
62 finally:
61 finally:
63 try:
62 util.tryunlink(lockpath)
64 os.unlink(lockpath)
65 except OSError as e:
66 if e.errno != errno.ENOENT:
67 raise
68 if parentfn:
63 if parentfn:
69 return parentfn(pid)
64 return parentfn(pid)
70 else:
65 else:
General Comments 0
You need to be logged in to leave comments. Login now