Re: close or kill?

Robert Sexton (
Mon, 14 Sep 1998 09:46:41 -0400 (EDT)

> (Albert Dorofeev) writes:
> > When the window manager (in our case AS) is quitting
> > it closes all windows. What command is used by the
> > window manager? Is it killing all the window processes
> > or is it sending "close" event to them?
> > 
> Actually what is happening is something like this: your .xsession has
> some stuff in it with the lasts line like this:
> exec afterstep
> whith no '&'.  That means when you exit afterstep, you are actually
> exiting X.  You can exit the window manager without killing all the
> windows if you have the '&' on the end of the window manager line of
> your .xsession.  However, you need to have X 'hinge' on something
> else.  Otherwise, X will start, any other apps in the .xsession will
> start, afterstep will start, then X will exit.

It depends a lot on how he's starting X and AS.  If he has a .xsession
file, he might be running xdm.  If its xdm, you don't actually want
'exec afterstep'.  xdm runs the .xsession script, and cycles back to a
login prompt after it falls out of the .xsession file.  I think in
this case, putting a & after afterstep would lead to some wierdness.
It might not even work.  (I'm not in the mood for experiments at the

This still leaves the question of how the windows die.  Somebody
(Probably the X server) sends out signals to all of the appropriate
children.  I'd bet its a SIGTERM or SIGHUP.  When I look at my process list,
I notice that most of my xterms are children of sh
<deleted>/.workspace_state, which is in turn a child of init.

I doubt that anybody is getting a 'window close' event, unless AS is
thoughtful enough to send one.  I'm not sure that cleaning up the
users processes is really the Window managers job.

Robert Sexton -, Cincinnati OH, USA
There's safety in numbers... Large prime numbers. - John Gilmore
Read the Newton FAQ! <>