[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] How can I run xvile like "gvim -f"?
From: |
Thomas Dickey |
Subject: |
Re: [vile] How can I run xvile like "gvim -f"? |
Date: |
Mon, 11 Dec 2017 18:24:08 -0500 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Dec 11, 2017 at 10:25:33PM +0000, Chris Green wrote:
> On Mon, Dec 11, 2017 at 04:51:19PM -0500, Thomas Dickey wrote:
> > On Mon, Dec 11, 2017 at 08:32:13PM +0000, Chris Green wrote:
> > > On Mon, Dec 11, 2017 at 01:47:54PM -0500, Paul Fox wrote:
> > > > address@hidden wrote:
> > > > > Chris Green writes:
> > > > > >On Mon, Dec 11, 2017 at 01:06:47PM +0000, Chris Green wrote:
> > > > > >> I am invoking xvile from a firefox extension (textern if anyone is
> > > > > >> interested, it's a replacement for "It's all text" which doesn't
> > > > work
> > > > > >> on Firefox 57 or newer).
> > > > > >>
> > > > > >> For this to work xvile needs to stay in the foreground when
> > > > invoked,
> > > > > >> i.e. it needs to to what gvim does with "gvim -f". Is there any
> > > > way
> > > > > >> to get it to do this or will I need some sort of wrapper?
> > > > > >>
> > > > > >To be more explicit I need xvile to not detach from the calling
> > > > > >process. This is so that the caller blocks until xvile exits.
> > > > >
> > > > > I guess I don't understand what you're asking. When I run xvile,
> > > > > the program stays in the foreground and the shell waits for the
> > > > > program to end. If that's what you're asking for, then as far as I
> > > > > can tell, the answer is "It does that by default."
> > > >
> > > > i just said the same thing privately to chris -- forgot to cc: the list.
> > > >
> > > ... and here's my reply (copied back to the list):-
> > >
> > > > i guess i'm a little confused, now that i've actually fired up xvile.
> > > >
> > > > if i start xvile from a shell, the shell waits for it to exit. if i
> > > > start xvile with "xvile -fork", then it doesn't wait -- i.e., i get a
> > > > fresh prompt.
> > > >
> > > You're right! So what does +fork do? ... or is it just the default
> > > behaviour?
> >
> > +fork tells xvile to NOT fork and set a new process group.
> >
> > > Whatever it doesn't do the same as 'gvim -f'.
> > >
> > > > do you perhaps have an X resources file that's changing xvile's
> > > > behavior?
> > > >
> > > No, as above I think mine works the same as yours. The question is
> > > how do I make it do what 'gvim -f' does (and what is that?).
> >
> > "xvile +fork" should work. But since it's not, I'd suggest finding why
> > xvile exits early. For that, I'd use strace (if you're running on a
> > Linux system - seems that strace's "maintainer" removed other platforms
> > a while back). By making the extension call a shell script which logs
> > the system calls to xvile, you can spot where the program gives up:
> >
> > #!/bin/sh
> > strace -s 1024 -o trace.log xvile +fork "$@"
> >
> > Perhaps the extension sends xvile a SIGHUP or something like that, and
> > gvim ignores it.
> >
> It doesn't give up, the xvile window opens and stays open but it never
> has control. No text appears in the window, no menus, nothing. ...
> and you can't exit either, you have to kill it.
hmm - I probably don't have a similar configuration to compare
(I'm only using Firefox on MacOS, which has its own problems),
but strace would still be the place to start. I took a look at
the output from starting xvile and gvim (athena) on my Debian 8
machine, and the traces are rather long. Also, I overlooked the
"-f" option (since the X11 library does its own fork, following
subprocesses is needed).
So... what type of system are you using (in case I can reproduce it)?
> Running xvile from an xterm (using a wrapper script) works OK.
oh - firefox -> add-on -> script -> xterm -> xvile
??
--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: Digital signature
- [vile] How can I run xvile like "gvim -f"?, Chris Green, 2017/12/11
- Re: [vile] How can I run xvile like "gvim -f"?, Chris Green, 2017/12/11
- Re: [vile] How can I run xvile like "gvim -f"?, Chris Green, 2017/12/11
- Re: [vile] How can I run xvile like "gvim -f"?, hymie, 2017/12/11
- Re: [vile] How can I run xvile like "gvim -f"?, Paul Fox, 2017/12/11
- Re: [vile] How can I run xvile like "gvim -f"?, Chris Green, 2017/12/11
- Re: [vile] How can I run xvile like "gvim -f"?, Thomas Dickey, 2017/12/11
- Re: [vile] How can I run xvile like "gvim -f"?, Chris Green, 2017/12/11
- Re: [vile] How can I run xvile like "gvim -f"?,
Thomas Dickey <=
- Re: [vile] How can I run xvile like "gvim -f"?, Chris Green, 2017/12/12
- Re: [vile] How can I run xvile like "gvim -f"?, Chris Green, 2017/12/11
Re: [vile] How can I run xvile like "gvim -f"?, J. Chris Coppick, 2017/12/11