Skip to content

Commit

Permalink
core: ignore SIGPIPE
Browse files Browse the repository at this point in the history
Ref: #477
  • Loading branch information
saghul committed Apr 9, 2024
1 parent 2ea9fc3 commit 6ac9f33
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "private.h"
#include "tjs.h"

#include <signal.h>
#include <string.h>

#ifdef TJS__HAS_MIMALLOC
Expand Down Expand Up @@ -399,6 +400,10 @@ void TJS_Initialize(int argc, char **argv) {

tjs__argc = argc;
tjs__argv = uv_setup_args(argc, argv);

#ifdef SIGPIPE
signal(SIGPIPE, SIG_IGN);
#endif
}

JSContext *TJS_GetJSContext(TJSRuntime *qrt) {
Expand Down

0 comments on commit 6ac9f33

Please sign in to comment.