OOM-killer prevention for master kdeinit process

Lubos Lunak l.lunak at suse.cz
Wed Aug 9 14:48:07 BST 2006


On Monday 07 August 2006 19:31, Oswald Buddenhagen wrote:
> On Mon, Aug 07, 2006 at 11:18:29AM +0200, Lubos Lunak wrote:
> >  Stupid OOM-killer should be probably avoided more.
>
> might well be. ;)
> but the point is, that having it in a separate binary doesn't exactly
> buy us a particular lot, unless it simplifies the surrounding logic.

 It avoids C++ ctors from libraries, for those who want to be really paranoid.

> btw, i think your reset_oom_protect() implementation has a race
> condition: the write may have been already read and the process
> SIGCONT-ed before you even SIGSTOP yourself. you should use sigprocmask
> and sigsuspend or something.

 Hmm, yes, although it should be very unlikely. Added a somewhat non-elegant 
solution.

> fwiw, kill(getpid(), SIG) should be raise(SIG).

 Which does exactly that :).

 Anyway, attached is the final(?) version.

-- 
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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: startkde.patch
Type: text/x-diff
Size: 509 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060809/1f6623e7/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kinit.patch
Type: text/x-diff
Size: 8808 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060809/1f6623e7/attachment-0001.patch>


More information about the kde-core-devel mailing list