Re: wtmp entry bug? ghost entry line...



On Mon, Mar 25, 2002 at 03:55:49AM +0100, m96 wrote:
> if i login to X with gdm, gdm creates an entry like the following to
> /var/log/wtmp (which is a must have on linux systems and for the other
> it depends). the line has been taken from last:
> 
> m96      :0             Mon Mar 25 01:41    gone - no logout
> 
> ps: i get the pid of the process with a small self written utility which
> is in that case 650.
> 
> it prints 'gone - no logout' because the pid of the process that had
> written the entry does no longer exist. so last (procps package) thinks
> this is a ghost entry.

I just fixed this in CVS for the gnome2 version.  Actually it is not that
difficult to mostly fix in your version.  Just go to the PreSession script
and where you see sessreg, put 'exec' before that.  sessreg uses the parent
process pid, which is stupid, but that's what it does.  For older
versions it will be the pid of the slave gdm process and for newest cvs HEAD
(gnome2) it will be the correct pid.

It took me a while before I got myself to snarf the sessreg source and see
what it does.  I should really be doing this by myself and not in an external
proggie like sessreg.

George

-- 
George <jirka 5z com>
   Never interrupt your enemy when he is making a mistake.
                       -- Napoleon Bonaparte



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]