ycmd using Vim stdin on Windows

This resolves YCM crash problems. Fixes #637.
This commit is contained in:
Strahinja Val Markovic 2013-11-07 14:53:15 -08:00
parent de0a8b613a
commit 0226ba4c90

View File

@ -98,10 +98,13 @@ class YouCompleteMe( object ):
std = 'stdout' )
self._server_stderr = filename_format.format( port = server_port,
std = 'stderr' )
# We need this on Windows otherwise bad things happen. See issue #637.
stdin = subprocess.PIPE if utils.OnWindows() else None
with open( self._server_stderr, 'w' ) as fstderr:
with open( self._server_stdout, 'w' ) as fstdout:
self._server_popen = subprocess.Popen( args,
stdin = stdin,
stdout = fstdout,
stderr = fstderr )
self._NotifyUserIfServerCrashed()