Detach from controlling terminal to avoid receiving SIGINT.
This commit is contained in:
parent
833d3b968c
commit
8f116b849a
@ -26,6 +26,7 @@ import json
|
|||||||
import argparse
|
import argparse
|
||||||
import waitress
|
import waitress
|
||||||
import signal
|
import signal
|
||||||
|
import os
|
||||||
from ycm import user_options_store
|
from ycm import user_options_store
|
||||||
from ycm import extra_conf_store
|
from ycm import extra_conf_store
|
||||||
from ycm import utils
|
from ycm import utils
|
||||||
@ -109,6 +110,11 @@ def Main():
|
|||||||
YcmCoreSanityCheck()
|
YcmCoreSanityCheck()
|
||||||
extra_conf_store.CallGlobalExtraConfYcmCorePreloadIfExists()
|
extra_conf_store.CallGlobalExtraConfYcmCorePreloadIfExists()
|
||||||
|
|
||||||
|
# If not on windows, detach from controlling terminal to prevent
|
||||||
|
# SIGINT from killing us.
|
||||||
|
if sys.platform is not 'win32':
|
||||||
|
os.setsid()
|
||||||
|
|
||||||
# This can't be a top-level import because it transitively imports
|
# This can't be a top-level import because it transitively imports
|
||||||
# ycm_core which we want to be imported ONLY after extra conf
|
# ycm_core which we want to be imported ONLY after extra conf
|
||||||
# preload has executed.
|
# preload has executed.
|
||||||
|
Loading…
Reference in New Issue
Block a user