Gautam Iyer wrote:
> On Tue, Oct 30, 2007 at 10:15:08AM +1100, Ben Schmidt wrote:
>
>>> !xdvi -hushstdout -s 5 -geometry 1024x900+416+0 -expert %<.dvi &
>>>
>>> which works fine from vim, but not from gvim.
>> I think what is happening is that Vim is creating a pseudo-terminal,
>> running the command, and then killing the pseudo terminal (and
>> consequently all commands attached to it) as soon as control is
>> returned (which is basically immediately due to your &). I come up
>> with this solution:
>
> I don't think Vim creates a new pseudo terminal. When I run :!xdvi &, I
> see a whole bunch of junk Xdvi status / error messages in my precious
> tex file all the time. (They of course disappear when I redraw the
> screen).
>
> You can of course confirm this by running "tty" before you run Vim,
> ":!tty" from Vim, and ":!tty&" from Vim. The first and second give the
> same number. The third gives "Not a TTY". (I don't have Gvim on my
> system so I have no idea what happens there.)
>
> GI
>
Console Vim doesn't need a pseudo terminal, he was talking about gvim.
Running ":!tty" in gvim gives (on my system) /dev/pts/0, in konsole it gives
various other /dev/pts/<number>, in the Linux text consoles (virtual
terminals) /dev/tty1 to /dev/tty6.
":!tty &" replies nothing; ":!bash -ic 'tty &'" replies [1] 19356 followed by
/dev/pts/0 (where 19356 is, I suppose, the process number of the forked
process).
So I think yes, gvim creates a pseudo terminal. If I repeat the command I get
/dev/pts/0 again but I suppose once the terminal has been closed its device
can be reused.
Best regards,
Tony.
--
Commitment, n.:
Commitment can be illustrated by a breakfast of ham and eggs.
The chicken was involved, the pig was committed.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---