[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Bug#38142: wrong wallpaper list kills xlock (fwd)
From: David Faure <david () mandrakesoft ! com>
Date: 2002-02-25 22:18:01
[Download RAW message or body]
On Friday 15 February 2002 20:42, Matthias Welwarsky wrote:
> On Friday 15 February 2002 19:32, Rik Hemsley wrote:
> > #if Stephan Kulow
> >
> > > On Friday, 15. February 2002 14:14, David Faure wrote:
> > > > Funny, as in: never thought this would happen....
> > > >
> > > > But seriously... Maybe this is a reason why we shouldn't have
> > > > merged kdesktop and kscreensaver (at least the lock stuff).
> > >
> > > The locking _is_ out of kdesktop. It's in the screensaver that is started
> > > from kdesktop. If kdesktop dies, it takes it's children with it, it
> > > seems. Solution is to reparent the screensaver. daemon() or what was the
> > > name of that function? :)
> >
> > setsid(2), I think.
>
> setpgid(2) is maybe better, because the screensaver is no session leader. If
> the screensaver should not die when kdesktop dies, move it out of the process
> group of kdesktop. if you open a new session for the screensaver, it will
> probably refuse to die when the real session leader (xsession) is killed...
I tried that but it doesn't appear to work, both go away when kdesktop is killed.
Help!
Index: kdesktop/lockeng.cc
===================================================================
RCS file: /home/kde/kdebase/kdesktop/lockeng.cc,v
retrieving revision 1.49
diff -u -p -r1.49 lockeng.cc
--- kdesktop/lockeng.cc 2002/01/23 02:23:34 1.49
+++ kdesktop/lockeng.cc 2002/02/25 22:10:43
@@ -617,6 +617,9 @@ bool SaverEngine::startHack()
if (mHackProc.start() == true)
{
+ // Dissociate from kdesktop, so that if kdesktop dies the lock remains
+ kdDebug() << " Calling setpgid(" << mHackProc.getPid() << ",1)" << endl;
+ setpgid(mHackProc.getPid(), 1);
#ifdef HAVE_SETPRIORITY
setpriority(PRIO_PROCESS, mHackProc.getPid(), mPriority);
#endif
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david, http://www.konqueror.org
KDE 3.0: Konquering the Desktops
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic