• Home
  • Raw
  • Download

Lines Matching +full:handle +full:- +full:sigint

24 #include "async_wrap-inl.h"
25 #include "debug_utils-inl.h"
26 #include "env-inl.h"
30 #include "util-inl.h"
53 uv_stop(&w->loop_); in Watchdog()
86 // timer handle. in Run()
87 uv_run(&wd->loop_, UV_RUN_DEFAULT); in Run()
90 // Close the timer handle on this side and let ~Watchdog() close async_ in Run()
91 uv_close(reinterpret_cast<uv_handle_t*>(&wd->timer_), nullptr); in Run()
96 *w->timed_out_ = true; in Timer()
97 w->isolate()->TerminateExecution(); in Timer()
98 uv_stop(&w->loop_); in Timer()
105 // Register this watchdog with the global SIGINT/Ctrl+C listener. in SigintWatchdog()
106 SigintWatchdogHelper::GetInstance()->Register(this); in SigintWatchdog()
108 SigintWatchdogHelper::GetInstance()->Start(); in SigintWatchdog()
113 SigintWatchdogHelper::GetInstance()->Unregister(this); in ~SigintWatchdog()
114 SigintWatchdogHelper::GetInstance()->Stop(); in ~SigintWatchdog()
119 isolate_->TerminateExecution(); in HandleSigint()
124 Local<FunctionTemplate> constructor = env->NewFunctionTemplate(New); in Init()
125 constructor->InstanceTemplate()->SetInternalFieldCount( in Init()
127 constructor->Inherit(HandleWrap::GetConstructorTemplate(env)); in Init()
129 env->SetProtoMethod(constructor, "start", Start); in Init()
130 env->SetProtoMethod(constructor, "stop", Stop); in Init()
132 env->SetConstructorFunction(target, "TraceSigintWatchdog", constructor); in Init()
147 // Register this watchdog with the global SIGINT/Ctrl+C listener. in Start()
148 SigintWatchdogHelper::GetInstance()->Register(watchdog); in Start()
150 int r = SigintWatchdogHelper::GetInstance()->Start(); in Start()
157 SigintWatchdogHelper::GetInstance()->Unregister(watchdog); in Stop()
158 SigintWatchdogHelper::GetInstance()->Stop(); in Stop()
166 int r = uv_async_init(env->event_loop(), &handle_, [](uv_async_t* handle) { in TraceSigintWatchdog() argument
168 ContainerOf(&TraceSigintWatchdog::handle_, handle); in TraceSigintWatchdog()
169 watchdog->signal_flag_ = SignalFlags::FromIdle; in TraceSigintWatchdog()
170 watchdog->HandleInterrupt(); in TraceSigintWatchdog()
182 env()->isolate()->RequestInterrupt( in HandleSigint()
185 if (self->signal_flag_ == SignalFlags::None) { in HandleSigint()
186 self->signal_flag_ = SignalFlags::FromInterrupt; in HandleSigint()
188 self->HandleInterrupt(); in HandleSigint()
205 // https://github.com/nodejs/node/pull/29207#issuecomment-527667993 get in HandleInterrupt()
209 "KEYBOARD_INTERRUPT: Script execution was interrupted by `SIGINT`\n"); in HandleInterrupt()
211 PrintStackTrace(env_->isolate(), in HandleInterrupt()
213 env_->isolate(), 10, v8::StackTrace::kDetailed)); in HandleInterrupt()
218 SigintWatchdogHelper::GetInstance()->Unregister(this); in HandleInterrupt()
219 SigintWatchdogHelper::GetInstance()->Stop(); in HandleInterrupt()
220 raise(SIGINT); in HandleInterrupt()
276 SignalPropagation wp = (*it)->HandleSigint(); in InformWatchdogsAboutSignal()
310 RegisterSignalHandler(SIGINT, HandleSignal); in Start()
332 if (--start_stop_count_ > 0) { in Stop()
358 RegisterSignalHandler(SIGINT, SignalExit, true); in Stop()