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

Michael Matz matz at kde.org
Thu Nov 20 10:06:01 GMT 2003


Hi,

On Thu, 20 Nov 2003, Lubos Lunak wrote:

> 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?

I have no idea how ksmserver currently uses KProcess, and how that one
works.  If ksmserver starts all childs through KProcess (i.e. _no_ direct
exec() calls anymore) and KProcess really takes care to reap zombies, then
the_reaper indeed isn't needed anymore.  (The above patch contained some
more hunks, though, remember when reverting).

Looking at the code in kprocctrl.cpp I see following problems: It uses a
C++ method as signal handler.  And it only waits for processes it
knows about.  This means that it's no general reaper handling all possible
childs, but only those it managed on it's own.  (And the logic is
generally a bit awkward, indirecting over a pipe).

Other than that I can't really comment on this code anymore, it has
changed too much since I last touched it.


Ciao,
Michael.





More information about the kde-core-devel mailing list