Description of problem:
Using Vim with default .vimrc and the cscope package installed, causes
directories /tmp/cscope.NNNN to be left behind after Vim exits. (NNNN is the
process ID). This is apparently a bug in Vim, not cscope:
After many such directories have appeared, Vim will occasionally spit out the
following error on startup (actually from cscope):
Error detected while processing /etc/vimrc:
cs_read_prompt EOF: Illegal seek
E609: Cscope error: cscope: Could not create private temp dir /tmp/cscope.11195
This is due to the directory already existing from a previous run. In order to
fully resolve this problem, Vim needs patching, and all existing /tmp/cscope.*
directories need to be purged.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
yum install vim-enhanced
yum install cscope
ls -d /tmp/cscope.*
Directories /tmp/cscope.* left behind when vim exits.
The /tmp/cscope.* directories should be removed when vim exits.
upstream is aware of this and is preparing a patch:
I've applied the patch mentioned in #1 (obtained from the following URL
http://article.gmane.org/gmane.editors.vim.devel/18908/raw to avoid HTML
encoding) on top vim-common-7.1.211-1.fc8 and can confirm that it solves the
problem for me.
I used the following scriptlet to cleanup the mess left in /tmp. It takes care
not to destroy any active cscope sessions.
ls -d /tmp/cscope.* | sed -e 's#/tmp/cscope.##' | while read PID ; do
if test -e /proc/$PID && grep -q cscope /proc/$PID/cmdline ; then
echo Active session in /tmp/cscope.$PID ;
rm -f /tmp/cscope.$PID ;
And of course I have a typo: we want "rm -rf" so it will remove the directory,
not just -f option. I had put an "echo" in front of the "rm" for testing
This is fixed in vim-7.1.281 or newer. This didn't make it into F9-Beta, but
will be in F9. In the meantime you can download packages from
*** Bug 443952 has been marked as a duplicate of this bug. ***