Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

addon: fix snapshot truncation, ignore SIGINT

Ignore SIGINT signals so that a C-c to the parent process doesn't kill the
child process that's busy writing out the heap snapshot.
  • Loading branch information...
commit 1d49679918aeedc918c06ffeff72651b1630af52 1 parent 4b8cad5
@bnoordhuis authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/
6 src/
@@ -77,6 +77,12 @@ void AsyncEvent(uv_async_t* handle, int status)
assert(handle == &async_handle);
if (fork() != 0) return;
+ // Stop C-c to main process from killing us.
+ struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = SIG_IGN;
+ if (sigaction(SIGINT, &sa, NULL)) abort();
timeval tv;
if (gettimeofday(&tv, NULL)) abort();

0 comments on commit 1d49679

Please sign in to comment.
Something went wrong with that request. Please try again.