vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] How can I run xvile like "gvim -f"?


From: Chris Green
Subject: Re: [vile] How can I run xvile like "gvim -f"?
Date: Mon, 11 Dec 2017 22:25:33 +0000
User-agent: Mutt/1.6.1 (2016-04-27)

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.

Running xvile from an xterm (using a wrapper script) works OK.

-- 
Chris Green



reply via email to

[Prev in Thread] Current Thread [Next in Thread]