Loading ...
Sorry, an error occurred while loading the content.

Re: vim script can't create /tmp file

Expand Messages
  • Marc Weber
    ... To my undestanding each vim instance creates /tmp/vEmReRC like directory. tempname() like functions return a new file within that directory. Vim should
    Message 1 of 19 , Dec 3, 2012
    • 0 Attachment
      Excerpts from sinbad's message of Mon Dec 03 11:47:02 +0100 2012:
      > one of the script in my vim environment is not able
      > to create a /tmp file, i keep getting the following
      > error. This script is invoked every time i write
      > the file contents.
      >
      > Error detected while processing function GenerateTags:
      > line 1:
      > E484: Can't open file /tmp/vEmReRC/36

      To my undestanding each vim instance creates /tmp/vEmReRC like
      directory.

      tempname() like functions return a new file within that directory.
      Vim should cleanup on clean exit in that directory.

      If vim can't write to that directory I have no idea what happened, but
      you can explore yourself: Try accessing that file: can you touch, read
      delete that /tmp/vEmReRC/36 file?

      That might give you some insight about what might be going wrong.
      Eg if you do rm -fr /tmp/* or such there will be an issue cause Vim won'
      t recreate that directory.

      Marc Weber

      --
      You received this message from the "vim_use" 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
    • Christian Brabandt
      ... Do you have some kind of clean up job running, that clears /tmp? Then those errors happen. Vim creates that directory only the first time, it needs a temp
      Message 2 of 19 , Dec 3, 2012
      • 0 Attachment
        On Mon, December 3, 2012 11:47, sinbad wrote:
        > one of the script in my vim environment is not able
        > to create a /tmp file, i keep getting the following
        > error. This script is invoked every time i write
        > the file contents.
        >
        > Error detected while processing function GenerateTags:
        > line 1:
        > E484: Can't open file /tmp/vEmReRC/36
        >
        >
        > Interestingly i am not seeing this error for the first
        > few writes after i open the file. the workaround is to
        > open/close the file, and i won't see the error for first
        > few writes, after that again i see the same error. any
        > clues for why it is happening and how to fix it.

        Do you have some kind of clean up job running, that clears /tmp?

        Then those errors happen. Vim creates that directory only the
        first time, it needs a temp file. Subsequent calls expect the
        temp directory to be existent.

        regards,
        Christian

        --
        You received this message from the "vim_use" 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
      • sinbad
        ... Looks like the tmp file deletion is the problem. when i started to see the errors i found that tmp file is missing. No i m not running any cleanup job. how
        Message 3 of 19 , Dec 3, 2012
        • 0 Attachment
          On Monday, December 3, 2012 5:08:29 PM UTC+5:30, Christian Brabandt wrote:
          > On Mon, December 3, 2012 11:47, sinbad wrote:
          >
          > > one of the script in my vim environment is not able
          >
          > > to create a /tmp file, i keep getting the following
          >
          > > error. This script is invoked every time i write
          >
          > > the file contents.
          >
          > >
          >
          > > Error detected while processing function GenerateTags:
          >
          > > line 1:
          >
          > > E484: Can't open file /tmp/vEmReRC/36
          >
          > >
          >
          > >
          >
          > > Interestingly i am not seeing this error for the first
          >
          > > few writes after i open the file. the workaround is to
          >
          > > open/close the file, and i won't see the error for first
          >
          > > few writes, after that again i see the same error. any
          >
          > > clues for why it is happening and how to fix it.
          >
          >
          >
          > Do you have some kind of clean up job running, that clears /tmp?
          >
          >
          >
          > Then those errors happen. Vim creates that directory only the
          >
          > first time, it needs a temp file. Subsequent calls expect the
          >
          > temp directory to be existent.
          >
          >
          >
          > regards,
          >
          > Christian

          Looks like the tmp file deletion is the problem.
          when i started to see the errors i found that
          tmp file is missing.

          No i'm not running any cleanup job. how do i know
          if someone else is deleting the file. is there a
          way to protect the tmp file not to be deleted.
          I do not suspect any of my other scripts are deleting
          the file, as i did not install any new scripts, and i
          was running with the same set of scripts for some
          years without any problems

          --
          You received this message from the "vim_use" 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
        • Christian Brabandt
          ... Check your cron jobs and check the installed packages. A package name such as tmpreaper is suspicious. An unconventional approach would be to create a file
          Message 4 of 19 , Dec 4, 2012
          • 0 Attachment
            On Tue, December 4, 2012 06:13, sinbad wrote:
            > Looks like the tmp file deletion is the problem.
            > when i started to see the errors i found that
            > tmp file is missing.
            >
            > No i'm not running any cleanup job. how do i know
            > if someone else is deleting the file. is there a
            > way to protect the tmp file not to be deleted.
            > I do not suspect any of my other scripts are deleting
            > the file, as i did not install any new scripts, and i
            > was running with the same set of scripts for some
            > years without any problems

            Check your cron jobs and check the installed packages.
            A package name such as tmpreaper is suspicious.

            An unconventional approach would be to create a file /tmp/dummy
            chattr +i it and watch the logs, if some program is complaining.

            regards,
            Christian

            --
            You received this message from the "vim_use" 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
          • sinbad
            ... actually i don t have the root permission. i m getting the following error, chattr: Operation not permitted while setting flags on vXrMR9M is there a way
            Message 5 of 19 , Dec 4, 2012
            • 0 Attachment
              On Tuesday, December 4, 2012 2:07:13 PM UTC+5:30, Christian Brabandt wrote:
              > On Tue, December 4, 2012 06:13, sinbad wrote:
              >
              > > Looks like the tmp file deletion is the problem.
              >
              > > when i started to see the errors i found that
              >
              > > tmp file is missing.
              >
              > >
              >
              > > No i'm not running any cleanup job. how do i know
              >
              > > if someone else is deleting the file. is there a
              >
              > > way to protect the tmp file not to be deleted.
              >
              > > I do not suspect any of my other scripts are deleting
              >
              > > the file, as i did not install any new scripts, and i
              >
              > > was running with the same set of scripts for some
              >
              > > years without any problems
              >
              >
              >
              > Check your cron jobs and check the installed packages.
              >
              > A package name such as tmpreaper is suspicious.
              >
              >
              >
              > An unconventional approach would be to create a file /tmp/dummy
              >
              > chattr +i it and watch the logs, if some program is complaining.
              >
              >
              >
              > regards,
              >
              > Christian

              actually i don't have the root permission.
              i'm getting the following error,

              chattr: Operation not permitted while setting flags on vXrMR9M

              is there a way to check if any of my vim script is deleting the
              file.

              thanks
              sinbad

              --
              You received this message from the "vim_use" 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
            • David Fishburn
              ... Is this a Vim you compiled yourself? David -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you
              Message 6 of 19 , Dec 4, 2012
              • 0 Attachment
                ...
                Looks like the tmp file deletion is the problem.
                when i started to see the errors i found that
                tmp file is missing.

                No i'm not running any cleanup job. how do i know
                if someone else is deleting the file. is there a
                way to protect the tmp file not to be deleted.
                I do not suspect any of my other scripts are deleting
                the file, as i did not install any new scripts, and i
                was running with the same set of scripts for some
                years without any problems

                Is this a Vim you compiled yourself?

                David
                 

                --
                You received this message from the "vim_use" 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
              • sinbad
                ... yes. i compiled it myself. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to.
                Message 7 of 19 , Dec 4, 2012
                • 0 Attachment
                  On Tuesday, December 4, 2012 7:02:34 PM UTC+5:30, David Fishburn wrote:
                  > ...
                  >
                  >
                  >
                  > Looks like the tmp file deletion is the problem.
                  >
                  > when i started to see the errors i found that
                  >
                  > tmp file is missing.
                  >
                  >
                  >
                  > No i'm not running any cleanup job. how do i know
                  >
                  > if someone else is deleting the file. is there a
                  >
                  > way to protect the tmp file not to be deleted.
                  >
                  > I do not suspect any of my other scripts are deleting
                  >
                  > the file, as i did not install any new scripts, and i
                  >
                  > was running with the same set of scripts for some
                  >
                  > years without any problems
                  >
                  >
                  >
                  > Is this a Vim you compiled yourself?
                  >
                  >
                  > David

                  yes. i compiled it myself.

                  --
                  You received this message from the "vim_use" 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
                • sinbad
                  ... any other pointers on how to get rid of this error. it s became very annoying. -- You received this message from the vim_use maillist. Do not top-post!
                  Message 8 of 19 , Dec 5, 2012
                  • 0 Attachment
                    On Tuesday, December 4, 2012 7:24:08 PM UTC+5:30, sinbad wrote:
                    > On Tuesday, December 4, 2012 7:02:34 PM UTC+5:30, David Fishburn wrote:
                    > > ...
                    > >
                    > >
                    > >
                    > > Looks like the tmp file deletion is the problem.
                    > >
                    > > when i started to see the errors i found that
                    > >
                    > > tmp file is missing.
                    > >
                    > >
                    > >
                    > > No i'm not running any cleanup job. how do i know
                    > >
                    > > if someone else is deleting the file. is there a
                    > >
                    > > way to protect the tmp file not to be deleted.
                    > >
                    > > I do not suspect any of my other scripts are deleting
                    > >
                    > > the file, as i did not install any new scripts, and i
                    > >
                    > > was running with the same set of scripts for some
                    > >
                    > > years without any problems
                    > >
                    > >
                    > >
                    > > Is this a Vim you compiled yourself?
                    > >
                    > >
                    > > David
                    >
                    > yes. i compiled it myself.

                    any other pointers on how to get rid of this error.
                    it's became very annoying.

                    --
                    You received this message from the "vim_use" 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
                  • David Fishburn
                    ... https://groups.google.com/forum/?fromgroups=#!topic/vim_use/JSXaM9YjWKo) after compiling my own version of Vim (which I do routinely). After updating again
                    Message 9 of 19 , Dec 5, 2012
                    • 0 Attachment
                      ...
                      > > Is this a Vim you compiled yourself?
                      > >
                      > >
                      > > David
                      >
                      > yes. i compiled it myself.

                      any other pointers on how to get rid of this error.
                      it's became very annoying.

                      The reason I asked is I ran into a similar issue (on Windows, https://groups.google.com/forum/?fromgroups=#!topic/vim_use/JSXaM9YjWKo) after compiling my own version of Vim (which I do routinely).

                      After updating again and recompiling, the problem went away.

                      Perhaps you have run into a similar issue and a recompile might get you going?

                      HTH,
                      David
                       

                      --
                      You received this message from the "vim_use" 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
                    • Christian Brabandt
                      ... Have you checked all your cronjobs and scripts, that you run? Can you eliminate, that root doesn t run some jobs, that clean /tmp? I once made a patch,
                      Message 10 of 19 , Dec 5, 2012
                      • 0 Attachment
                        On Wed, December 5, 2012 09:37, sinbad wrote:
                        > any other pointers on how to get rid of this error.
                        > it's became very annoying.

                        Have you checked all your cronjobs and scripts, that you run?
                        Can you eliminate, that root doesn't run some jobs, that clean /tmp?

                        I once made a patch, that changed Vims behaviour to check everytime,
                        whether the temp directory is still valid and if not re-create it,
                        but Bram didn't want to include it.

                        Since this happens usually only very rarely, I have this command
                        in my .vimrc:
                        " In case /tmp get's clean out, make a new tmp directory for vim
                        :command! Mktmpdir call mkdir(fnamemodify(tempname(),":p:h"),"",0700)

                        regards,
                        Christian

                        --
                        You received this message from the "vim_use" 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
                      • Gary Johnson
                        ... You may have to do some digging to find root s cron jobs. For example, on my Ubuntu 10.04 system, sudo cron -l -u root says that root has no cron jobs,
                        Message 11 of 19 , Dec 5, 2012
                        • 0 Attachment
                          On 2012-12-05, Christian Brabandt wrote:
                          > On Wed, December 5, 2012 09:37, sinbad wrote:
                          > > any other pointers on how to get rid of this error.
                          > > it's became very annoying.
                          >
                          > Have you checked all your cronjobs and scripts, that you run?
                          > Can you eliminate, that root doesn't run some jobs, that clean /tmp?

                          You may have to do some digging to find root's cron jobs. For
                          example, on my Ubuntu 10.04 system, "sudo cron -l -u root" says that
                          root has no cron jobs, but it does run /etc/crontab and the scripts
                          in /etc/cron.d. It doesn't clean /tmp, though.

                          Gary

                          --
                          You received this message from the "vim_use" 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
                        • sinbad
                          ... I am running as non-root and i don t have sudo permission, i was not able to check the root s cron jobs, i checked mine there are no cron jobs running. am
                          Message 12 of 19 , Dec 10, 2012
                          • 0 Attachment
                            On Wednesday, December 5, 2012 10:51:05 PM UTC+5:30, Gary Johnson wrote:
                            > On 2012-12-05, Christian Brabandt wrote:
                            >
                            > > On Wed, December 5, 2012 09:37, sinbad wrote:
                            >
                            > > > any other pointers on how to get rid of this error.
                            >
                            > > > it's became very annoying.
                            >
                            > >
                            >
                            > > Have you checked all your cronjobs and scripts, that you run?
                            >
                            > > Can you eliminate, that root doesn't run some jobs, that clean /tmp?
                            >
                            >
                            >
                            > You may have to do some digging to find root's cron jobs. For
                            >
                            > example, on my Ubuntu 10.04 system, "sudo cron -l -u root" says that
                            >
                            > root has no cron jobs, but it does run /etc/crontab and the scripts
                            >
                            > in /etc/cron.d. It doesn't clean /tmp, though.
                            >
                            >
                            >
                            > Gary

                            I am running as non-root and i don't have sudo
                            permission, i was not able to check the root's
                            cron jobs, i checked mine there are no cron
                            jobs running. am i screwed ?

                            --
                            You received this message from the "vim_use" 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
                          • Christian Brabandt
                            ... It s annoying but you are not screwed. Simply recreate that directory and you should be fine. See the command, I posted earlier. regards, Christian -- You
                            Message 13 of 19 , Dec 10, 2012
                            • 0 Attachment
                              On Tue, December 11, 2012 07:15, sinbad wrote:
                              > I am running as non-root and i don't have sudo
                              > permission, i was not able to check the root's
                              > cron jobs, i checked mine there are no cron
                              > jobs running. am i screwed ?

                              It's annoying but you are not screwed. Simply recreate that
                              directory and you should be fine. See the command, I posted
                              earlier.

                              regards,
                              Christian

                              --
                              You received this message from the "vim_use" 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
                            • Gary Johnson
                              ... I don t think it s hopeless, but may be difficult to find the cause. You wrote that you don t have root or sudo permission. That suggests that you are
                              Message 14 of 19 , Dec 10, 2012
                              • 0 Attachment
                                On 2012-12-10, sinbad wrote:
                                > On Wednesday, December 5, 2012 10:51:05 PM UTC+5:30, Gary Johnson wrote:
                                > > On 2012-12-05, Christian Brabandt wrote:

                                > > > Have you checked all your cronjobs and scripts, that you run?
                                > > > Can you eliminate, that root doesn't run some jobs, that clean /tmp?
                                > >
                                > > You may have to do some digging to find root's cron jobs. For
                                > > example, on my Ubuntu 10.04 system, "sudo cron -l -u root" says that
                                > > root has no cron jobs, but it does run /etc/crontab and the scripts
                                > > in /etc/cron.d. It doesn't clean /tmp, though.

                                > I am running as non-root and i don't have sudo
                                > permission, i was not able to check the root's
                                > cron jobs, i checked mine there are no cron
                                > jobs running. am i screwed ?

                                I don't think it's hopeless, but may be difficult to find the cause.

                                You wrote that you don't have root or sudo permission. That
                                suggests that you are using a computer administered by someone else.
                                Can you just ask that person or someone in that group if they know
                                of any /tmp-cleaning program that might be running?

                                On my Ubuntu 10.04 and Fedora 14 systems, all the /etc/cron* files
                                have 755 permissions, so you could poke around there and see if you
                                can find some /tmp cleaner.

                                It _might_ help to know the timing of these deletions. Do they
                                happen after Vim has been running for a certain amount of time? Do
                                they happen at certain times of day, or at a certain number of
                                minutes past the hour? That might give you a clue to the cause. If
                                you could predict the times at which it occurs, you could possibly
                                run "ps -ef" in a loop at that time and look for suspicious
                                processes.

                                HTH,
                                Gary

                                --
                                You received this message from the "vim_use" 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
                              • sinbad
                                ... there are two possibilities here, first one of vim script is deleting the tmpfile, the other is some cron job might be deleting it. in the first case can i
                                Message 15 of 19 , Dec 11, 2012
                                • 0 Attachment
                                  On Tuesday, December 11, 2012 12:51:56 PM UTC+5:30, Gary Johnson wrote:
                                  > On 2012-12-10, sinbad wrote:
                                  >
                                  > > On Wednesday, December 5, 2012 10:51:05 PM UTC+5:30, Gary Johnson wrote:
                                  >
                                  > > > On 2012-12-05, Christian Brabandt wrote:
                                  >
                                  >
                                  >
                                  > > > > Have you checked all your cronjobs and scripts, that you run?
                                  >
                                  > > > > Can you eliminate, that root doesn't run some jobs, that clean /tmp?
                                  >
                                  > > >
                                  >
                                  > > > You may have to do some digging to find root's cron jobs. For
                                  >
                                  > > > example, on my Ubuntu 10.04 system, "sudo cron -l -u root" says that
                                  >
                                  > > > root has no cron jobs, but it does run /etc/crontab and the scripts
                                  >
                                  > > > in /etc/cron.d. It doesn't clean /tmp, though.
                                  >
                                  >
                                  >
                                  > > I am running as non-root and i don't have sudo
                                  >
                                  > > permission, i was not able to check the root's
                                  >
                                  > > cron jobs, i checked mine there are no cron
                                  >
                                  > > jobs running. am i screwed ?
                                  >
                                  >
                                  >
                                  > I don't think it's hopeless, but may be difficult to find the cause.
                                  >
                                  >
                                  >
                                  > You wrote that you don't have root or sudo permission. That
                                  >
                                  > suggests that you are using a computer administered by someone else.
                                  >
                                  > Can you just ask that person or someone in that group if they know
                                  >
                                  > of any /tmp-cleaning program that might be running?
                                  >
                                  >
                                  >
                                  > On my Ubuntu 10.04 and Fedora 14 systems, all the /etc/cron* files
                                  >
                                  > have 755 permissions, so you could poke around there and see if you
                                  >
                                  > can find some /tmp cleaner.
                                  >
                                  >
                                  >
                                  > It _might_ help to know the timing of these deletions. Do they
                                  >
                                  > happen after Vim has been running for a certain amount of time? Do
                                  >
                                  > they happen at certain times of day, or at a certain number of
                                  >
                                  > minutes past the hour? That might give you a clue to the cause. If
                                  >
                                  > you could predict the times at which it occurs, you could possibly
                                  >
                                  > run "ps -ef" in a loop at that time and look for suspicious
                                  >
                                  > processes.
                                  >
                                  >
                                  >
                                  > HTH,
                                  >
                                  > Gary

                                  there are two possibilities here, first one of vim
                                  script is deleting the tmpfile, the other is some cron
                                  job might be deleting it. in the first case can i put a
                                  watch on the tmpfile created from with in vim. In the
                                  latter case, can i force vim to create the tmp directory
                                  in my homedir rather than in /tmp so that the cron job
                                  won't have access to it. please suggest ways to achieve
                                  above.

                                  --
                                  You received this message from the "vim_use" 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
                                • Gary Johnson
                                  ... Somebody suggested earlier a way to put a watch on that tmpfile, but you apparently don t have permission to do that. As for putting your tmp directory
                                  Message 16 of 19 , Dec 11, 2012
                                  • 0 Attachment
                                    On 2012-12-11, sinbad wrote:

                                    > there are two possibilities here, first one of vim
                                    > script is deleting the tmpfile, the other is some cron
                                    > job might be deleting it. in the first case can i put a
                                    > watch on the tmpfile created from with in vim. In the
                                    > latter case, can i force vim to create the tmp directory
                                    > in my homedir rather than in /tmp so that the cron job
                                    > won't have access to it. please suggest ways to achieve
                                    > above.

                                    Somebody suggested earlier a way to put a watch on that tmpfile, but
                                    you apparently don't have permission to do that.

                                    As for putting your tmp directory someplace else,

                                    :help tempfile

                                    says that on Unix, Vim uses the first of this list of directories:
                                    $TMPDIR, /tmp, current-dir, $HOME. Therefore, you could set TMPDIR
                                    in your environment before starting Vim, either by setting it in
                                    your shell's .rc file (e.g., ~/.bashrc) or by setting it as you
                                    start Vim, e.g.,

                                    TMPFILE=~/tmp vim

                                    You could put that in a wrapper script or in an alias:

                                    alias vim='TMPFILE=~/tmp vim'

                                    Regards,
                                    Gary

                                    --
                                    You received this message from the "vim_use" 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
                                  • Gary Johnson
                                    ... An even easier way is to put a line like this towards the top of your ~/.vimrc: let $TMPDIR = $HOME. /tmp Regards, Gary -- You received this message from
                                    Message 17 of 19 , Dec 11, 2012
                                    • 0 Attachment
                                      On 2012-12-11, Gary Johnson wrote:
                                      > On 2012-12-11, sinbad wrote:
                                      >
                                      > > there are two possibilities here, first one of vim
                                      > > script is deleting the tmpfile, the other is some cron
                                      > > job might be deleting it. in the first case can i put a
                                      > > watch on the tmpfile created from with in vim. In the
                                      > > latter case, can i force vim to create the tmp directory
                                      > > in my homedir rather than in /tmp so that the cron job
                                      > > won't have access to it. please suggest ways to achieve
                                      > > above.
                                      >
                                      > Somebody suggested earlier a way to put a watch on that tmpfile, but
                                      > you apparently don't have permission to do that.
                                      >
                                      > As for putting your tmp directory someplace else,
                                      >
                                      > :help tempfile
                                      >
                                      > says that on Unix, Vim uses the first of this list of directories:
                                      > $TMPDIR, /tmp, current-dir, $HOME. Therefore, you could set TMPDIR
                                      > in your environment before starting Vim, either by setting it in
                                      > your shell's .rc file (e.g., ~/.bashrc) or by setting it as you
                                      > start Vim, e.g.,
                                      >
                                      > TMPFILE=~/tmp vim
                                      >
                                      > You could put that in a wrapper script or in an alias:
                                      >
                                      > alias vim='TMPFILE=~/tmp vim'

                                      An even easier way is to put a line like this towards the top of
                                      your ~/.vimrc:

                                      let $TMPDIR = $HOME."/tmp"

                                      Regards,
                                      Gary

                                      --
                                      You received this message from the "vim_use" 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
                                    • sinbad
                                      ... Gary, Christian, thanks for the help. setting $TMPDIR to my homedir solved the problem, so it s really one of the root s cron jobs screwing with my /tmp
                                      Message 18 of 19 , Dec 13, 2012
                                      • 0 Attachment
                                        On Tuesday, December 11, 2012 10:10:02 PM UTC+5:30, Gary Johnson wrote:
                                        > On 2012-12-11, Gary Johnson wrote:
                                        >
                                        > > On 2012-12-11, sinbad wrote:
                                        >
                                        > >
                                        >
                                        > > > there are two possibilities here, first one of vim
                                        >
                                        > > > script is deleting the tmpfile, the other is some cron
                                        >
                                        > > > job might be deleting it. in the first case can i put a
                                        >
                                        > > > watch on the tmpfile created from with in vim. In the
                                        >
                                        > > > latter case, can i force vim to create the tmp directory
                                        >
                                        > > > in my homedir rather than in /tmp so that the cron job
                                        >
                                        > > > won't have access to it. please suggest ways to achieve
                                        >
                                        > > > above.
                                        >
                                        > >
                                        >
                                        > > Somebody suggested earlier a way to put a watch on that tmpfile, but
                                        >
                                        > > you apparently don't have permission to do that.
                                        >
                                        > >
                                        >
                                        > > As for putting your tmp directory someplace else,
                                        >
                                        > >
                                        >
                                        > > :help tempfile
                                        >
                                        > >
                                        >
                                        > > says that on Unix, Vim uses the first of this list of directories:
                                        >
                                        > > $TMPDIR, /tmp, current-dir, $HOME. Therefore, you could set TMPDIR
                                        >
                                        > > in your environment before starting Vim, either by setting it in
                                        >
                                        > > your shell's .rc file (e.g., ~/.bashrc) or by setting it as you
                                        >
                                        > > start Vim, e.g.,
                                        >
                                        > >
                                        >
                                        > > TMPFILE=~/tmp vim
                                        >
                                        > >
                                        >
                                        > > You could put that in a wrapper script or in an alias:
                                        >
                                        > >
                                        >
                                        > > alias vim='TMPFILE=~/tmp vim'
                                        >
                                        >
                                        >
                                        > An even easier way is to put a line like this towards the top of
                                        >
                                        > your ~/.vimrc:
                                        >
                                        >
                                        >
                                        > let $TMPDIR = $HOME."/tmp"
                                        >
                                        >
                                        >
                                        > Regards,
                                        >
                                        > Gary

                                        Gary, Christian, thanks for the help.
                                        setting $TMPDIR to my homedir solved
                                        the problem, so it's really one of the
                                        root's cron jobs screwing with my /tmp
                                        files.

                                        --
                                        You received this message from the "vim_use" 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
                                      Your message has been successfully submitted and would be delivered to recipients shortly.