Fwd: [Bug 64785] ksmserver fails to quit when session ended

Lubos Lunak l.lunak at suse.cz
Thu Nov 20 09:46:51 GMT 2003



----------  Forwarded Message  ----------
------- Additional Comments From grant.mcdorman at cedara.com  2003-11-19 23:37
 ------- In KSMServer constructor we find this code:
    signal(SIGCHLD, the_reaper);
(line 808).

KProcessController's signal handler is initialized before KSMServer calls
 this; as a result, this overrides KProcessController's signal handler, and
 results in nothing working.

Commenting out the line allows ksmserver to exit normally.

Presumably on some systems (Linux, perhaps?) signal() and sigaction() are
 independant. On Solaris, signal() is a wrapper for sigaction().

-------------------------------------------------------

 I'm not quite sure why this code works on some platforms and doesn't on 
others, but I think I know how to fix this. This code comes from 
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdebase/ksmserver/server.cpp.diff?r1=1.10&r2=1.11 , 
and if memory serves well, it's from the times where KProcessController used 
to set up its signal handlers only after creating first KProcess instance. At 
the time of that commit, ksmserver didn't use KProcess, so there was no 
SIGCHLD handler. I believe that commit can be simply reverted now, as 
KProcessController is setup in KApplication now. Any objections?

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/




More information about the kde-core-devel mailing list