On Di, 03 Apr 2018, brucekan...@gmail.com wrote: > I'm using VIM 8.0 and set the option: "set cscopequickfix=s-,c-,d-,i-,t-,e-" > vim will prompt "E484: Can't open file /tmp/vxxxxx/n" occasionally if I'm not > root user. > > when set above option, vim will generate a temp directory under /tmp, I found > the temp direcoty was deleted every time when the fault was occurred. > > after checking source code, the suspecious place is in function: vim_tempname > > if (vim_tempdir != NULL) > { > /* There is no need to check if the file exists, because we own the > * directory and nobody else creates a file in it. */ > sprintf((char *)itmp, "%s%ld", vim_tempdir, temp_count++); > return vim_strsave(itmp); > } > > if the vim_tempdir is deleted by unknown operation/process, then vim will > fault due to it not checking this temp directory before writing it, maybe we > need to check vim_tempdir here, if it's not accessable, we build another temp > directory.
Do you have any tmp cleanup packages installed that may remove such things? Try to disable it. I have proposed a similar patch several years ago, but it was found to work around the real problem that /tmp should not be cleaned randomly, so it wasn't included. Best, Christian -- Wußten Sie schon... ... daß der Walfisch, das größte lebende Säugetier, alle anderen Säugetiere an Größe übertrifft? -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.