Fixing Leo and Idle OS shutdown bug?

DIG dig.list at telkel.net
Fri Aug 9 18:51:37 CEST 2002


Hi, Edward K. Ream !

 On Fri, Aug 09, 2002 at 01:11:57PM +0000, Edward K. Ream wrote:

> Hmm.  There are conflicting reports about what happens when Linux shuts down
> and there are dirty files in Idle.

I don't think so.


> Dmitri I GOULIAEV says:
> 
> > Does Idle prompt for save for dirty files on shutdown in Linux? I know for
> > sure that it does not on Windows.
> 
> Yes, it does (at least, version 0.4) for the windows which are open by
> ``File->New Window'' or ``File->Open''. When you attempt to close such
> window, you are asked for the confirmation.
> ``Python Shell'' windows can be closed without any confirmation from the
> user.

I was talking about the process of closing window, not about the shutdown.


> support @ internetdiscovery.com (Mike Clarkson) says:
> 
> >Is there any way to interrupt the shutdown process in TK?  I have tried
> >binding to Destroy or WM_DELETE_WINDOW for the top level window, like this,
> >with no effect:
> 
> It's WM_DELETE_WINDOW for the normal program exit, but the OS shutting
> down message is WM_QUERYENDSESSION  and  WM_ENDSESSION.
> Problem is that wm_protocol doesn't catch either of these messages.
> 
> To change this you have to change Tk.  Attached is an old posting
> requesting this change to Tk, but AFAIK it still hasn't been
> implemented (sorry about the line wrapping).

Mike is talking about the shutdown process (what you do before switch your computer off).


> Can anyone suggest a resolution?

When I close "dirty" file windows (not python shell windows), then I asked for confirmation to continue. This question come from the program. 

If I kill this program with kill, xkill, or by means of WM, then I asked for confirmation, and this question come from my WM (if WM is polite).

I did not verified what would happen if I shutdown my X server (and WM with it), nor if I shutdown my computer. 


Regards,

-- 
DIG (Dmitri I GOULIAEV)




More information about the Python-list mailing list