Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <chrono>
  3. #include <thread>
  4. #include <signal.h>
  5.  
  6. int main(int argc, char const *argv[])
  7. {
  8.     std::cout << "Before exception out.." << std::endl;
  9.     std::cerr << "Before exception.." << std::endl;
  10.     // throw std::exception();
  11.     raise(SIGSEGV);
  12.  
  13.     std::this_thread::sleep_for(std::chrono::seconds(5));
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement