mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 06:58:42 +00:00
use os._exit() rather than exit() when forking
This commit is contained in:
parent
89f88f3beb
commit
511bfd5d84
1 changed files with 3 additions and 3 deletions
|
@ -84,14 +84,14 @@ class Web(_UI):
|
||||||
# fork() so the parent can exit, returns control to the command line
|
# fork() so the parent can exit, returns control to the command line
|
||||||
# or shell invoking the program.
|
# or shell invoking the program.
|
||||||
if os.fork():
|
if os.fork():
|
||||||
exit(0)
|
os._exit(0)
|
||||||
|
|
||||||
# setsid() to become a process group and session group leader.
|
# setsid() to become a process group and session group leader.
|
||||||
os.setsid()
|
os.setsid()
|
||||||
|
|
||||||
# fork() again so the parent, (the session group leader), can exit.
|
# fork() again so the parent, (the session group leader), can exit.
|
||||||
if os.fork():
|
if os.fork():
|
||||||
exit(0)
|
os._exit(0)
|
||||||
|
|
||||||
# chdir() to esnure that our process doesn't keep any directory in
|
# chdir() to esnure that our process doesn't keep any directory in
|
||||||
# use that may prevent a filesystem unmount.
|
# use that may prevent a filesystem unmount.
|
||||||
|
@ -112,4 +112,4 @@ class Web(_UI):
|
||||||
|
|
||||||
def start():
|
def start():
|
||||||
web = Web()
|
web = Web()
|
||||||
web.start()
|
web.start()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue