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,552 of 33,346   
   Seungbeom Kim to Harry   
   Re: Best practice to handle segmentation   
   07 Oct 11 06:31:13   
   
   d5397751   
   From: musiphil@bawi.org   
      
   On 2011-10-06 11:34, Harry wrote:   
   > Hi Gurus,   
   > Is it a best practice to handle segmentation fault inside a shared   
   > library(.so) C++ ?   
   > 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.   
      
   Technically OT :), but I've seen programs that fork and let the child   
   process run a subtask that might crash. In that way, the parent process   
   can detect the crash and convert it into an error code or an exception   
   when the child crashes.   
      
   --   
   Seungbeom Kim   
      
      
         [ 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