fork(2) download
  1. #include <csignal>
  2. #include <iostream>
  3. #include <cstdlib>
  4. #include <stdio.h>
  5.  
  6. using std::cout;
  7. struct S
  8. {
  9. S(){ cout << "S\n"; }
  10. ~S(){ cout << "~S\n"; }
  11. };
  12.  
  13. thread_local S s;
  14.  
  15. int main()
  16. {
  17. cout << "Something\n";
  18. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
Something