Hi every body

Jens Zurheide jens.zurheide at gmx.de
Tue Jul 2 22:09:57 UTC 2002

>int main(int argc, char *argv[]){
>     signal(15, terminar);
>     sav = new CSavdaemon();
>     kill_all();
>     return EXIT_SUCCESS;
>CColaMensjes is a class to work with IPC V Messages queues, CSavdaemon sav
> has a memember of type CColaMensajes * and sav->Cola() return
> CColaMensajes *. When debuggin (without signals)every goes fine, but at
> run time I get a Segmentation fault in the line:
>CColaMensajes * tmp_queue = sav->Cola();

I don't know what you did exactly but if you send the signal to your 
application directly after startup it might be that the signal handler is 
already installed but the line with the new CSavdaemon is not yet executed, 
leaving sav pointing to something/somewhere in cybersace (but most likely 
not what you expect). Then, referencing sav in kill_all() must crash your 
application. So, does exchangeing the lines signal(15, terminar); and sav = 
new CSavdaemon(); help?

Good luck, 

to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«

More information about the KDevelop mailing list