From: Hanspeter Roth <[EMAIL PROTECTED]>

> can a TK application detach from X11 without terminating
> immediately?

Can you tell us more about what it is you are wanting to do?  Are you 
looking for a way to 'gracefully' shut down during the loss of the X
server?

The problem is this - the only way the GUI has to display things on an
X Window system is via the X11 server - once it is gone, there's no
way to display anything.

What you might be able to do is to set up a multi-tier sort of arrangement.
The first layer would be tcl only - it would start up.  It might then start
a child process which did a package require on Tk to start up the GUI.
Then, if the child dies, set up some sort of alert/fileevent/other callback
type setup so the parent was made aware of the problem and attempts to start
a new GUI child.

This keeps things restarted.

As for saving things, I'm uncertain what kind of signal is generated
with the death of the X11 server - perhaps using TclX's signal handling
you can catch the 'death of a server' signal and do the saving you need.
-- 
Tcl - The glue of a new generation.  <URL: http://wiki.tcl.tk/ >
Larry W. Virden <mailto:[EMAIL PROTECTED]> <URL: http://www.purl.org/NET/lvirden/>
Even if explicitly stated to the contrary, nothing in this posting should 
be construed as representing my employer's opinions.
-><-


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/vtcl-user

Reply via email to