Skip to content

Commit

Permalink
Linux ignore other signals on stop and try continue
Browse files Browse the repository at this point in the history
Repro with Sys.command("inkscape", [srcPath, "-o", dstPath])
  • Loading branch information
yuxiaomao committed Jul 15, 2024
1 parent cc595a0 commit 2384f23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Binary file modified hldebug-wrapper/lib/linux/hldebug.node
Binary file not shown.
5 changes: 4 additions & 1 deletion hldebug-wrapper/src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,10 @@ HL_API int hl_debug_wait( int pid, int *thread, int timeout ) {
int sig = WSTOPSIG(status);
if( sig == SIGSTOP || sig == SIGTRAP )
return 1;
if( sig == SIGCHLD )
if( sig == SIGSEGV )
return 3;
// other signals such as SIGCHLD, ignore and continue
if( ptrace(PTRACE_CONT,pid,0,0) >= 0 )
return 4;
return 3;
}
Expand Down

0 comments on commit 2384f23

Please sign in to comment.