[gdm-list] [Fwd: Re: PostSession script support fades out from 2.4 to 2.6?]
- From: Brian Cameron <Brian Cameron Sun COM>
- To: gdm-list gnome org
- Subject: [gdm-list] [Fwd: Re: PostSession script support fades out from 2.4 to 2.6?]
- Date: Tue, 16 Aug 2005 14:17:58 -0500
Forwarding this email from Jerry G. DeLapp to gdm-list since it was sent to
the old alias and got missed when we converted the archives.
-------- Original Message --------
Subject: Re: PostSession script support fades out from 2.4 to 2.6?
Date: Mon, 15 Aug 2005 18:20:22 -0600
From: Jerry G. DeLapp <jgd-gdm kodiak lanl gov>
Reply-To: jgd-gdm kodiak lanl gov
To: Brian Cameron <Brian Cameron Sun COM>
CC: gdm sunsite dk
References: <200508091413 16702 jgd-gdm kodiak lanl gov> <42F91239 9090203 sun com>
On Tuesday 09 August 2005 02:29 pm, Brian Cameron wrote:
It is a known bug that the PostSession script doesn't get run properly
on exit in some situations.
Refer to bugzilla bug 152906:
I believe in the situation you describe, the gdm_slave_xioerror_handler
will get called to process the signal and this should notice that the
session was started and call term_session_stop_and_quit, which will call
I suspect this might not be working due to the setjmp/longjmp logic
because calling longjmp will return the state of the program to when
setjmp was called, so the state of the global variables may get lost
causing gdm to "forget" it has a running session and causing the
PostSession to not get called. You can refer to the bug report
mentioned above for more information.
I would add some gdm_debug() calls to the code and verify that this
is the problem. If so, we could rip out the setjmp/longjmp code
and fix the code so it does the same thing without using jumping.
I suspect that this will fix the problem. Could you help with
Spent the past few days dusting off my last experience with setjmp (about 2
decades ago), adding gdm_debug calls in various places, and tweaking code.
Found the following. These are based upon the RHEL4 source, which is a
patched up version of 220.127.116.11.
1) There's a 'session_started = FALSE' at the beginning of
gdm_slave_session_stop. When I started adding debug code it became apparent
that this was the line that was turning off session_started for the longjmp
target code. I'm not sure it should even be there.
2) You never get to the postsession script because: The call to
gdm_server_whack_clients in gdm_slave_session_stop will trigger an xioerror.
The user has crashed X with ctl-alt-backspace, and whack_clients tries to
access the X server. The resulting xioerror event then vectors you via the
xioerror handler to the quick exit code. That is, more than one crash
handler gets called and the second one terminates the correct execution of
the original exit handler. The problem code has comments that say "fix
I was able to get back to the "old, correct" behavior by commenting the code
line in (1) and, later, after I understood the handler behavior, adding
another setjmp that caused the xioerror to be ignored during the call to
I still need to check whether the added setjmp code means that item 1 is not
really an issue, and to create a patch that doesn't have the fourteen or so
additional gdm_debug and printf patches I created. I'll post the patch for
further discussion when I've done that, probably tomorrow.
] [Thread Prev