Skip to content

Commit afa20a6

Browse files
committed
bug fixed
1 parent d837d36 commit afa20a6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tcpdns.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,8 @@ def main():
223223
print '>> Enable Cache: %r' % (options.cache)
224224
print '>> Now you can set dns server to 127.0.0.1'
225225

226-
os_name = os.name
227-
228226
if options.daemon:
229-
if os_name == 'nt':
227+
if os.name == 'nt':
230228
raise Exception("Windows doesn't support daemon process")
231229
else:
232230
try:
@@ -236,7 +234,7 @@ def main():
236234
print '*** Please install python-daemon'
237235

238236
try:
239-
with daemon.DaemonContext():
237+
with daemon.DaemonContext(detach_process=True):
240238
main()
241239
except:
242240
main()

0 commit comments

Comments
 (0)