[Top][All Lists]

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

Re: [vile] Is there any easy way to timeout a vile session?

From: Chris Green
Subject: Re: [vile] Is there any easy way to timeout a vile session?
Date: Sat, 31 Oct 2015 18:48:23 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Sat, Oct 31, 2015 at 02:39:18PM -0400, Thomas Dickey wrote:
> On Sat, Oct 31, 2015 at 06:19:41PM +0000, Chris Green wrote:
> > I want to get a vile edit session to timeout.
> > 
> > I have a script that decrypts a file and feeds it into vile for
> > viewing or editing.  I want to get vile to exit after, say, five
> > minutes so I don't leave the file on view on my screen.
> > 
> > At the moment I can't work out a neat way of doing this.  A 'kill -15'
> > of vile generates various errors and, worse, a pop-up message.  A
> > 'kill -9' is quieter but seems a bit drastic.
> > 
> > What would be nice would be a way to fire off something in the
> > background within vile that would exit after the timeout.
> > 
> > Any ideas?
> not offhand:
> vile doesn't run its own background tasks.  The signal handlers are built-in
> (not scripts).
> vile uses the same (imdying) handler for signals that are supposed to kill it.
> The "kill -15" is the usual route, but tells it to (attempt to) save modified
> buffers as if it had died, anyway.  A "kill -9" does prevent it from trying
> save...
It's probably because it's editing/viewing stdin that vile falls in a
bit of a crumpled heap in this case when you do a 'kill -15'.  :-)

I was looking at using xdotool to simulate pressing 'ZZ' but it feels
a bit complicated for such a simple task as one has to work out the
right window etc.  Still it might be the only way.


Chris Green

reply via email to

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