[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: RE: KCrash API
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-04-13 9:52:09
[Download RAW message or body]

On Thu, Apr 13, 2000 at 11:48:34AM +0200, Hummel, Timo wrote:
> >Did you note my comment in the last commit, about the strange
> >docu in kcrash.h ?
> 
> Yes, I did.
> 
> >Basically, to define you own handler, passing the name of a
> >static void blah (int)
> >function works fine, no need for the very strange syntax the
> >header docu suggests.
> 
> The strange function statement is important to save the function
> into a variable, at least it was the only way I got it working :)
> It is also important to store the emergency save function...if you
> got a better/other/simpler solution, just tell me.

You misunderstood me. The code is fine, but the docu in the header:
"* @li an user defined function in the form: HandlerType myCrashHandler { myFunctions(); }"
is a bit strange. If I define my own handler, I don't see how I can declare
it using this very strange syntax. As I said, passing the name of a
static (if in a class) void blah(int)
works fine, no need to use HandlerType nor to ... define a function
right before the call (is that what the docu suggests ?).

There is also:
"#warning the comment above needs to be checked if HandlerType myCrashHandler { m
yFunctions(); } works"
and indeed I didn't manage to make it work :-)

Perhaps I'm just stupid and didn't see how to use that syntax, but in 
any case I don't see the need for it.

> >did exactly the same job, so I'm not sure KCrash is really useful
> >in that context (this is about kioslaves, which are daemons, i.e.
> 
> Didn't get that one...

kioslaves (you know what they are, right ?) are not KApplications,
so they don't have the default crash handler, nor do they really
want to use it. So I just set a custom sigsegv handler (in slavebase.cpp).
The point is that I used KCrash for that, but I could have done as well
without (one line in both cases ;-)

-- 
David FAURE
david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/
KDE, Making The Future of Computing Available Today

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic