> On Sun, 18 Jun 2006 16:16:01 +0200,
> Bram Moolenaar <[EMAIL PROTECTED]> wrote:
>
> 
> Dennis Nezic wrote:
> 
> > when i exit my wm (e16), since it doesn't (and shouldn't) close any
> > other programs, gvim is stuck without an x server, and doesn't
> > handle this loss gracefully. effectively, it's as if it was kill
> > -9'ed ... and thus leaves temporary files behind, which i later
> > have to labouriously clean up.
> > 
> > can it not do something better .... like simply close down if no
> > changes were made to the file (and close any temp files). and, i
> > guess, leave the temp files behind if changes were made (as it
> > currently does in all cases :\).
> 
> Vim normally handles a shutdown of the window manager gracefully.
> There is a protocol for this and Vim implements it.  This may result
> in the window manager not exiting when Vim has modified files.
> 
> If you forcefully kill the window manager or the X server you will
> get a hanging gvim (and possibly other programs).  That's your own
> fault then.
> 
> If you shut down the window manager properly but Vim still hangs
> somehow, perhaps the window manager doesn't work properly.  You could
> try another one.


The Rasterman seems to disagree. he responds as follows:


> On Mon, 19 Jun 2006 10:53:32 +0900,
> Carsten Haitzler (The Rasterman) <[EMAIL PROTECTED]> wrote:
>
> [...] there is no "shutdown protocol" for a wm - it doesn't
> exist in x. read the icccm. there is a protocol a wm can use to
> request an application to delete its window (and often apps will take
> this as a hint and take their sweet time about it - sometimes pop up
> "are you sure you want to exit?" dialogs etc.) but there is no
> protocol to say "go shut down and cleanup ASAP and don't ask 'are you
> sure?' etc.". if he is referring to a shutdown/save protocol in a
> SESSION MANAGER (using libICE etc. etc.) THEN sure - there is one.
> but not for window managers that don't pretend to be a session
> manager too. my reply to enlightenment-users still stands. an app can
> trap loss of x connection and still shut down gracefully (make it an
> expedited shutdown with no "are you sure" dialogs - simply save and
> clean up as fast as possible). e17 does just that itself as did e16.
> they both handle loss of an x display themselves gracefully.
> 
> i bet you vim isn't setting its own handler for x io errors (which is
> the handler called in this case, the default in xlib just calls exit
> (), unless you set your own). fact is - gvim should also handle the
> case where you ctrl+alt +backspace to kill x - and clean up, if it
> can (which it can). the only case where gvim could not manage a
> cleanup on shutdown is on a kill -9 as a process is killed off with
> no choice in the matter.

he seems to have a good point. ?

Reply via email to