I wrote a Linux program based on a buggy open source library. This library sometimes triggers segfaults that I cannot control. And of course once the library has segfaults,
Unfortunately, you cannot make the program continue. The buggy code that resulted in SIGSEGV usually triggers undefined behaviour like dereferencing a null pointer or reading garbage memory. You cannot possibly continue if your code operates on invalid data.
You can handle the signal, but the most you can do is dump the stack trace and die.
C and C++ are inherently unsafe, you cannot handle errors triggered by undefined behaviour and let the program continue.