home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 31,549 of 33,346   
   Ian Collins to Harry   
   Re: Best practice to handle segmentation   
   06 Oct 11 14:01:16   
   
   d5397751   
   From: ian-news@hotmail.com   
      
   On 10/ 7/11 07:34 AM, Harry wrote:   
   > Hi Gurus,   
   > Is it a best practice to handle segmentation fault inside a shared   
   > library(.so) C++ ?   
      
   In most case, no.   
      
   > The shared library is used by C/C++ and java applications.   
   > My intention is that the program using my shared library should get   
   > return values in all cases even in case of segmentation faults.   
      
   How would you manage this portably?  What about other asynchronous events?   
      
   A library should never take ownership of things like signals, that control   
   belongs to the application.   
      
   --   
   Ian Collins   
      
      
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca