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

carbon vim bug: control-c during shell script logs you out

Expand Messages
  • the shrubber
    If i m running a shell script from the OS X vim (for example, one that sets up classpath and then runs the Ant compiler) and i hit control-C, i get logged out.
    Message 1 of 5 , Aug 22, 2002
    • 0 Attachment
      If i'm running a shell script from the OS X vim (for example, one that sets up classpath and then runs the Ant compiler) and i hit control-C, i get logged out. The expected behaviour is as in the X11 version, i.e., the script halts and you get an error.

      This is really annoying because once i log in, i have a bunch of swap files to take care of. (It was even worse what vim was crashing in response to the swap file dialog)

      Anyone care to take a look or at least confirm this?

      Cheers,

      (-S-)



      -----------------------------------------------------
      Protect yourself from spam, use http://sneakemail.com
    • ewitness - Ben Fowler
      ... Would you care to give another detail on this. Do you think that vim is crashing in response to the Ctrl-C and bringing down its parent shell or terminal?
      Message 2 of 5 , Aug 22, 2002
      • 0 Attachment
        At 12:21 pm -0400 22/8/02, the shrubber wrote:
        >If i'm running a shell script from the OS X vim (for example, one that sets up classpath and then runs the Ant compiler) and i hit control-C, i get logged out. The expected behaviour is as in the X11 version, i.e., the script halts and you get an error.
        >
        >This is really annoying because once i log in, i have a bunch of swap files to take care of. (It was even worse what vim was crashing in response to the swap file dialog)
        >
        >Anyone care to take a look or at least confirm this?

        Would you care to give another detail on this. Do you think that
        vim is crashing in response to the Ctrl-C and bringing down its
        parent shell or terminal? Or do you really think that your shell
        (the one started vim in) kills its child processes and exits, much
        as it might in response to a Ctrl-D.

        Do you get a core dump?

        Is there anything written to the console log?

        Finally, would you give the versions of the programs involved
        and a description of a short simple way of producing the
        probelmatic behaviour.

        Ben.


        --
        Privileged/Confidential Information may be contained in this message.
        If you are not the addressee indicated in this message (or responsible
        for delivery of the message to such person), you may not copy or deliver
        this message to anyone. In such case, you should destroy this message
        and kindly notify the sender by reply email. Please advise immediately
        if you or your employer do not consent to Internet email messages of this
        kind. Opinions, conclusions and other information in this message that
        do not relate to the official business of ewitness Limited shall be
        understood as neither given nor endorsed by it.

        eWitness Limited, Alpha House, Redvers Close, Lawnswood Business Park, Leeds, LS16 6QY
        Telephone: 0113 2951112 Fax: 0113 2951114
      • the shrubber
        Ah... so sorry for the skimpiness. On Thu, Aug 22, 2002 at 17:33:50 +0100, bfowler@ewitness.co.uk wrote ... Hmm... well i m running Vim from the OS X graphical
        Message 3 of 5 , Aug 22, 2002
        • 0 Attachment
          Ah... so sorry for the skimpiness.

          On Thu, Aug 22, 2002 at 17:33:50 +0100, bfowler@... wrote
          > vim is crashing in response to the Ctrl-C and bringing down its
          > parent shell or terminal? Or do you really think that your shell
          > (the one started vim in) kills its child processes and exits, much
          > as it might in response to a Ctrl-D.
          > vim is crashing in response to the Ctrl-C and bringing down its
          > parent shell or terminal? Or do you really think that your shell

          Hmm... well i'm running Vim from the OS X graphical shell, i.e. not the command line. My personal and very fuzzy suspicions are more like the latter, i.e, for some reason, the Control-C gets interpreted by the parent shell which then proceeds to kills everything under it, which in OS X terms, means i get logged out with a nary a confirmation dialog.

          > Do you get a core dump?

          Not that i can see. I've done a "find ~ -name core" and a find /Applications/Local/vim -name core" with no results

          > Is there anything written to the console log?

          Well, if you're talking about Console.app, nothing written. Is there somewhere else i can look. I highly doubt there's a /var/sys/logs/vim :-)

          > Finally, would you give the versions of the programs involved
          > and a description of a short simple way of producing the
          > probelmatic behaviour.

          The problematic vim is Benji Fisher's vim for OS X,
          http://macvim.swdev.org/OSX, 6.1.141, and if i recall correctly, the prior versions as well.

          Any other vim for OS X (one that runs in terminal, one that runs off X11) is fine.

          You can replicate this with a simple script

          # !/bin/sh
          # sleep.sh
          echo "now sleeping"
          sleep 10

          And in vim, do !sleep.sh, and hit control-C while it's sleeping

          Cheers,

          (-S-)

          -----------------------------------------------------
          Protect yourself from spam, use http://sneakemail.com
        • ewitness - Ben Fowler
          ... My version of Carbon Vim was compiled by me a few days ago, and is a little later that one you mentioned VIM - Vi IMproved 6.1 (2002 Mar 24, compiled
          Message 4 of 5 , Aug 22, 2002
          • 0 Attachment
            At 1:06 pm -0400 22/8/02, the shrubber wrote:
            >[ ...]
            >You can replicate this with a simple script
            >
            ># !/bin/sh
            ># sleep.sh
            >echo "now sleeping"
            >sleep 10
            >
            >And in vim, do !sleep.sh, and hit control-C while it's sleeping

            My version of Carbon Vim was compiled by me a few days ago, and is
            a little later that one you mentioned

            VIM - Vi IMproved 6.1 (2002 Mar 24, compiled 08/16/02 21:37:42)
            MacOS X (unix) version
            Included patches: 1-153
            Big version with Carbon GUI. Features included (+) or not (-):
            +autocmd -balloon_eval +browse ++builtin_terms +byte_offset +cindent -clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv -cscope +dialog_con +diff +digraphs -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +folding -footer
            +fork() -gettext -hangul_input -iconv +insert_expand +jumplist +keymap +langmap -libcall +linebreak +lispindent +listcmds +localmap +menu
            +mksession +modify_fname +mouse -mouseshape -mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_xterm +multi_byte +multi_lang -osfiletype
            +path_extra -perl +postscript +printer -python +quickfix +rightleft -ruby +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl -terminfo -termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit
            +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xterm_clipboard -xterm_save
            system vimrc file: "$VIM/vimrc"
            user vimrc file: "~/.vimrc"
            user exrc file: "~/.exrc"
            system gvimrc file: "$VIM/gvimrc"
            user gvimrc file: "~/.gvimrc"
            system menu file: "$VIMRUNTIME/menu.vim"


            I used

            :! ./sleep.sh

            I found that Ctrl-C didn't crash anything, but it didn't
            do quite what I expected either.

            Pressing Ctrl-C causes these 3 characters to appear on the
            command-line:

            <o-tilde> <a sub-linear chevron (Spanish closing single quote?)> <^H>

            and after the script finishes, vim prints

            interrupt:


            So this sounds very much like a bug.

            If you have the developer tools then you might be able to compile
            a later version for you to use without the log-out action, but you
            might be better off with a Darwin version. Otherwise you will have to
            wait until someone who knows more about vim than I do pipes up.

            Ben.
            --
            Privileged/Confidential Information may be contained in this message.
            If you are not the addressee indicated in this message (or responsible
            for delivery of the message to such person), you may not copy or deliver
            this message to anyone. In such case, you should destroy this message
            and kindly notify the sender by reply email. Please advise immediately
            if you or your employer do not consent to Internet email messages of this
            kind. Opinions, conclusions and other information in this message that
            do not relate to the official business of ewitness Limited shall be
            understood as neither given nor endorsed by it.

            eWitness Limited, Alpha House, Redvers Close, Lawnswood Business Park, Leeds, LS16 6QY
            Telephone: 0113 2951112 Fax: 0113 2951114
          • the shrubber
            1) nod to Ben for the helpful-info prodding and the extra hint. 2) out of curiosity, i tried running the executable directly from the command line, and from
            Message 5 of 5 , Aug 22, 2002
            • 0 Attachment
              1) nod to Ben for the helpful-info prodding and the extra hint.

              2) out of curiosity, i tried running the executable directly from the command line, and from there, Vim's behaviour is the good one. In other words, you hit control-C and it says "shell returned 1" or something like that.

              3) So, if anyone's looking for a minor workaround:

              alias macvim '/Applications/Local/vim/Vim.app/Contents/MacOS/Vim -v -g'

              Cheers,

              (-S-)


              -----------------------------------------------------
              Protect yourself from spam, use http://sneakemail.com
            Your message has been successfully submitted and would be delivered to recipients shortly.