Re: How to kill application when X-Server is terminated



In article <pan.2006.12.22.15.23.03.188751@xxxxxxxxx>,
"Felix E. Klee" <fk@xxxxxxxxx> wrote:

We have the problem that under certain (rather complicated) circumstances,
an X application stays alive forever after the X server has been killed.
It seems that, in this case, an application only gets killed once it tries
to unsuccessfully communicate with the X server. Examples:

* xterm: Never terminates, at least as long as there is no update of the
content within the xterm (I assume that an "xterm" showing the output of
"top" would terminate quickly).

* xclock: Terminates immediately once the X server has been killed.

* xeyes: Stays alive after the X server has been killed, but terminates
once the X server has been started again. This is a special case: Don't
waste your thoughts on it.

Now, we've a TCL/TK application that behaves just like "xterm". How can
we force it to communicate with the X server regularly (so that it gets
killed once the X server dies)?

If you have the command pidof

#!/bin/bash
x=`pidof wish` && kill $x
.



Relevant Pages

  • Re: CoDisconnectObject and nt services?
    ... You where right, an exception is thrown. ... This is different than the behaviour for an ATL EXE server, ... > which, as you mention, terminates after the last client disconnects. ...
    (microsoft.public.vc.atl)
  • How to kill application when X-Server is terminated
    ... an X application stays alive forever after the X server has been killed. ... xterm: Never terminates, at least as long as there is no update of the ... Terminates immediately once the X server has been killed. ...
    (comp.lang.tcl)
  • Re: Server Infected by virus and unable to clean
    ... the virus has disabled regedit, taskmanager and hides all desktop icons. ... terminates any program including antivirus thats started. ... i dont want to format the server ... If you just "clean" the drive there is a very real chance that you've ...
    (microsoft.public.windows.server.general)
  • Re: server and client threads
    ... >terminates. ... How then does the server get signaled that the child thread has ... When you spawn the child thread you ordinarily pass it a parameter. ... notify its parent about any special events that may be useful. ...
    (microsoft.public.vc.mfc)
  • Re: Running scripts in the Background...
    ... When i run the job in background mode and exit the term session...it terminates ... [Server killMsgRcv.pl accepting clients] ...
    (perl.beginners)