Permalink
Browse files

process, bugfix: ctrl_c will cause the program to crash during startup.

  • Loading branch information...
xicilion committed Oct 24, 2017
1 parent 418d2a8 commit 344f0ae6aa610fe4b7b313cc82e2e60b5a0fbccc
Showing with 7 additions and 1 deletion.
  1. +7 −1 fibjs/src/process/process_signal.cpp
@@ -37,7 +37,13 @@ static void _InterruptCallback(v8::Isolate* v8_isolate, void* data)
result_t async_signal(const char* name)
{
s_isolates.head()->RequestInterrupt(_InterruptCallback, (void*)name);
Isolate* isolate = s_isolates.head();
if (isolate)
isolate->RequestInterrupt(_InterruptCallback, (void*)name);
else
_exit(1);
return 0;
}

0 comments on commit 344f0ae

Please sign in to comment.