Prevent setsid() failure from taking down ycmd
This commit is contained in:
parent
1721597f0c
commit
479ad62555
@ -113,7 +113,11 @@ def Main():
|
||||
# If not on windows, detach from controlling terminal to prevent
|
||||
# SIGINT from killing us.
|
||||
if not utils.OnWindows():
|
||||
try:
|
||||
os.setsid()
|
||||
# setsid() can fail if the user started ycmd directly from a shell.
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
# This can't be a top-level import because it transitively imports
|
||||
# ycm_core which we want to be imported ONLY after extra conf
|
||||
|
Loading…
Reference in New Issue
Block a user