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

vim 6.0ad terminal problem (Was: Re: [14172] |& broken in 4.0.1-pre-3?)

Expand Messages
  • Thomas Köhler
    [For all of the vim-dev members: I ve been reporting to the zsh-workers list that vim --version |& head didn t work correctly] On Mon, Apr 30, 2001 at
    Message 1 of 4 , May 1, 2001
    • 0 Attachment
      [For all of the vim-dev members: I've been reporting to the zsh-workers
      list that "vim --version |& head" didn't work correctly]

      On Mon, Apr 30, 2001 at 03:58:20PM -0700,
      Danek Duvall <duvall@...> wrote:
      > I haven't actually looked to see what changes Bram put into 6.0ad, but he
      > was talking about determining if vim was attached to a terminal by checking
      > to see if stderr was attached to the terminal.

      Of course, this is very bad luck for what I do. I often do a simple
      command like
      vim --version |& head -1
      to get the version of vim that's running on the current machine (in
      fact, I don't type that much ;-)

      > Each case here where the output is missing you've sent stderr somewhere
      > other than the terminal, and so vim figures it can't print.

      Well, which is wrong, of course.
      Some kind of very wrong, sometimes I do a
      command 2>/dev/null
      for commands that I expect to use the terminal but for which I don't
      want to mess up their own terminal.

      *eeks*

      vim 2>/dev/null
      -> just beeps (but does so very often), the beeping is interrupted by
      ctrl-c, but then it hangs, eating all available CPU :-}
      kill -9 helps (kill -15 doesn't). _Very_ bad ;-)

      > There really ought to be a better way to get this information -- all three
      > standard fds can be redirected, but the program can still be running in a
      > terminal, no?

      command </some/file >/some/other/file 2>/third/file
      Surely this is possible.
      Oh well...

      > Danek

      Ciao,
      Thomas

      --
      Thomas Köhler Email: jean-luc@... | LCARS - Linux
      <>< WWW: http://jeanluc-picard.de | for Computers
      IRC: jeanluc | on All Real
      PGP public key available from Homepage! | Starships
    • Bram Moolenaar
      ... OK, so the check for stderr not being a terminal isn t good enough. Perhaps adding a check if the GUI is going to be started will help. Then this still
      Message 2 of 4 , May 1, 2001
      • 0 Attachment
        Thomas Koehler wrote:

        > Of course, this is very bad luck for what I do. I often do a simple
        > command like
        > vim --version |& head -1
        > to get the version of vim that's running on the current machine (in
        > fact, I don't type that much ;-)
        >
        > > Each case here where the output is missing you've sent stderr somewhere
        > > other than the terminal, and so vim figures it can't print.
        >
        > Well, which is wrong, of course.
        > Some kind of very wrong, sometimes I do a
        > command 2>/dev/null
        > for commands that I expect to use the terminal but for which I don't
        > want to mess up their own terminal.

        OK, so the check for stderr not being a terminal isn't good enough. Perhaps
        adding a check if the GUI is going to be started will help. Then this still
        won't work:

        gvim --version >& file

        But that's less common than using "vim --version". It will still work to
        detect that gvim was started from the desktop. And starting vim from the
        desktop requires a terminal anyway.

        > vim 2>/dev/null
        > -> just beeps (but does so very often), the beeping is interrupted by
        > ctrl-c, but then it hangs, eating all available CPU :-}
        > kill -9 helps (kill -15 doesn't). _Very_ bad ;-)

        Try typing ":q<CR>". I don't understand why it would eat CPU cycles though,
        it's just running without producing any output. CTRL-C doesn't get you out of
        Vim, as always. Perhaps you somehow redirected input as well?

        --
        hundred-and-one symptoms of being an internet addict:
        9. All your daydreaming is preoccupied with getting a faster connection to the
        net: 28.8...ISDN...cable modem...T1...T3.

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
        \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      • F. G. Marx
        I get: quitting X while having a vim session suspended in an xterm leaves a rogue vim session, a child of PID 1 (init) with no terminal, eating a lot of
        Message 3 of 4 , May 1, 2001
        • 0 Attachment
          I get: quitting X while having a vim session suspended in an xterm
          leaves a "rogue" vim session, a child of PID 1 (init) with no terminal,
          eating a lot of cpu.... Have to kill -KILL it....


          On Tue, 1 May 2001 09:38:37 +0200, Thomas =?iso-8859-1?Q?K=F6hler?= <jean-luc@...> wrote:
          >
          >--S1BNGpv0yoYahz37
          >Content-Type: text/plain; charset=iso-8859-1
          >Content-Disposition: inline
          >Content-Transfer-Encoding: quoted-printable
          >
          >[For all of the vim-dev members: I've been reporting to the zsh-workers
          >list that "vim --version |& head" didn't work correctly]
          >
          >On Mon, Apr 30, 2001 at 03:58:20PM -0700,
          >Danek Duvall <duvall@...> wrote:
          >> I haven't actually looked to see what changes Bram put into 6.0ad, but he
          >> was talking about determining if vim was attached to a terminal by checki=
          >ng
          >> to see if stderr was attached to the terminal.
          >
          >Of course, this is very bad luck for what I do. I often do a simple
          >command like
          > vim --version |& head -1
          >to get the version of vim that's running on the current machine (in
          >fact, I don't type that much ;-)
          >
          >> Each case here where the output is missing you've sent stderr somewhere
          >> other than the terminal, and so vim figures it can't print.
          >
          >Well, which is wrong, of course.
          >Some kind of very wrong, sometimes I do a
          >command 2>/dev/null
          >for commands that I expect to use the terminal but for which I don't
          >want to mess up their own terminal.
          >
          >*eeks*
          >
          >vim 2>/dev/null
          >-> just beeps (but does so very often), the beeping is interrupted by
          >ctrl-c, but then it hangs, eating all available CPU :-}
          >kill -9 helps (kill -15 doesn't). _Very_ bad ;-)
          >
          >> There really ought to be a better way to get this information -- all three
          >> standard fds can be redirected, but the program can still be running in a
          >> terminal, no?
          >
          >command </some/file >/some/other/file 2>/third/file
          >Surely this is possible.
          >Oh well...
          >
          >> Danek
          >
          >Ciao,
          >Thomas
          >
          >--=20
          > Thomas K=F6hler Email: jean-luc@... | LCARS - Linux
          > <>< WWW: http://jeanluc-picard.de | for Computers
          > IRC: jeanluc | on All Real
          > PGP public key available from Homepage! | Starships
          >
          >--S1BNGpv0yoYahz37
          >Content-Type: application/pgp-signature
          >Content-Disposition: inline
          >
          >-----BEGIN PGP SIGNATURE-----
          >Version: GnuPG v1.0.4 (GNU/Linux)
          >Comment: For info see http://www.gnupg.org
          >
          >iD8DBQE67mf9TEYXWMJlHuYRAuKBAKCfrX27lCr6qN7V5xE4scJnBwiBrgCeIjOz
          >dhmKBGKqGRsylYrq2h8LCF4=
          >=6EC8
          >-----END PGP SIGNATURE-----
          >
          >--S1BNGpv0yoYahz37--
          >
          >
          ------------------------------------------------
          f.g.marx <fmarx@...>
        • Thomas Köhler
          On Tue, May 01, 2001 at 01:11:28PM +0200, ... Uhm. Somehow this mail took more than two weeks to make its way to me. What s wrong here? ... May still happen,
          Message 4 of 4 , May 17, 2001
          • 0 Attachment
            On Tue, May 01, 2001 at 01:11:28PM +0200,
            Bram Moolenaar <Bram@...> wrote:
            > Date: Tue, 01 May 2001 13:11:28 +0200

            Uhm. Somehow this mail took more than two weeks to make its way to me.
            What's wrong here?

            > Thomas Koehler wrote:
            >
            > > Of course, this is very bad luck for what I do. I often do a simple
            > > command like
            > > vim --version |& head -1
            > > to get the version of vim that's running on the current machine (in
            > > fact, I don't type that much ;-)
            > >
            > > > Each case here where the output is missing you've sent stderr somewhere
            > > > other than the terminal, and so vim figures it can't print.
            > >
            > > Well, which is wrong, of course.
            > > Some kind of very wrong, sometimes I do a
            > > command 2>/dev/null
            > > for commands that I expect to use the terminal but for which I don't
            > > want to mess up their own terminal.
            >
            > OK, so the check for stderr not being a terminal isn't good enough. Perhaps
            > adding a check if the GUI is going to be started will help. Then this still
            > won't work:
            >
            > gvim --version >& file
            >
            > But that's less common than using "vim --version".

            May still happen, for example if you want to know what's compiled in
            your shipped-by-redhat gvim (which is _not_ the same binary as "vim")

            > It will still work to detect that gvim was started from the desktop.

            Uhm... why do we need this? I don't remember right now :)

            > And starting vim from the desktop requires a terminal anyway.

            Sure.

            > > vim 2>/dev/null
            > > -> just beeps (but does so very often), the beeping is interrupted by
            > > ctrl-c, but then it hangs, eating all available CPU :-}
            > > kill -9 helps (kill -15 doesn't). _Very_ bad ;-)
            >
            > Try typing ":q<CR>".

            I tried that, and it didn't help in any way.

            > I don't understand why it would eat CPU cycles though,

            Well, it just did - it didn't tell me, too ;-)

            > it's just running without producing any output. CTRL-C doesn't get you out of
            > Vim, as always. Perhaps you somehow redirected input as well?

            No. I double-checked that one, to be sure.

            Ciao,
            Thomas

            --
            Thomas Köhler Email: jean-luc@... | LCARS - Linux
            <>< WWW: http://jeanluc-picard.de | for Computers
            IRC: jeanluc | on All Real
            PGP public key available from Homepage! | Starships
          Your message has been successfully submitted and would be delivered to recipients shortly.