sbl/scvim — pull request #36 by carlocapocasa (2014-11-23 20:51:36+00:00)
Title: check for pipe in vim

In Linux, launching SClangStart() a second time will detach the running pipe from vim, resulting in an unreachable session that persists in the background even after closing vim.

Starting a new session with an unreachable session already around will create two-headed demonic scvim that randomly sends commands to the newly started or the backgrounded session. Both will even report back their output so it seems like only one scvim is running.

I have no idea why this detachment happens, since the ruby script does proper checking, but the easiest solution seems to be to check for a pipe file directly in vimscript.

The disadvantage is of course that the pipe path is now stored in two locations, but it seems like the lesser evil for now.