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: > > [email protected] 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.
--
Thomas E. Dickey <[email protected]>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: Digital signature
_______________________________________________ vile mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/vile
