kill_action.cpp 376 B

123456789101112131415161718192021
  1. #include "kill_action.h"
  2. #ifndef _win_
  3. #include <sys/types.h>
  4. #include <signal.h>
  5. #endif
  6. #include <stdlib.h>
  7. using namespace NLWTrace;
  8. using namespace NLWTrace::NPrivate;
  9. bool TKillActionExecutor::DoExecute(TOrbit&, const TParams&) {
  10. #ifdef _win_
  11. abort();
  12. #else
  13. int r = kill(getpid(), SIGABRT);
  14. Y_ABORT_UNLESS(r == 0, "kill failed");
  15. return true;
  16. #endif
  17. }