Show More
@@ -29,11 +29,11 def runservice(opts, parentfn=None, init | |||||
29 | def writepid(pid): |
|
29 | def writepid(pid): | |
30 | if opts['pid_file']: |
|
30 | if opts['pid_file']: | |
31 | if appendpid: |
|
31 | if appendpid: | |
32 | mode = 'a' |
|
32 | mode = 'ab' | |
33 | else: |
|
33 | else: | |
34 | mode = 'w' |
|
34 | mode = 'wb' | |
35 | fp = open(opts['pid_file'], mode) |
|
35 | fp = open(opts['pid_file'], mode) | |
36 | fp.write(str(pid) + '\n') |
|
36 | fp.write(str(pid).encode('latin1') + '\n') | |
37 | fp.close() |
|
37 | fp.close() | |
38 |
|
38 | |||
39 | if opts['daemon'] and not opts['daemon_postexec']: |
|
39 | if opts['daemon'] and not opts['daemon_postexec']: |
General Comments 0
You need to be logged in to leave comments.
Login now