aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-09-12 14:42:55 +0200
committerRickard Green <[email protected]>2018-09-12 14:42:55 +0200
commitd1ff3b3bec26a5f6bc354581d3056ee6277d39eb (patch)
tree3ae998da0dafe93b1d84e57f7f7939a53ef22438 /erts/emulator/sys
parent9d22c4a02643f883e05d4e245c9724ead3c1ef11 (diff)
parent6d665a8296999822e4d516343d0e21ed62e70b37 (diff)
downloadotp-d1ff3b3bec26a5f6bc354581d3056ee6277d39eb.tar.gz
otp-d1ff3b3bec26a5f6bc354581d3056ee6277d39eb.tar.bz2
otp-d1ff3b3bec26a5f6bc354581d3056ee6277d39eb.zip
Merge branch 'maint'
* maint: Updated OTP version Update release notes Update version numbers erts: Fix "Prevent inconsistent node lists" fix Fix include-path regression caused by dd0a39c Restore default SIGTERM behaviour for port programs
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r--erts/emulator/sys/unix/erl_child_setup.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/sys/unix/erl_child_setup.c b/erts/emulator/sys/unix/erl_child_setup.c
index 221ee2a69d..129861ebd5 100644
--- a/erts/emulator/sys/unix/erl_child_setup.c
+++ b/erts/emulator/sys/unix/erl_child_setup.c
@@ -133,6 +133,7 @@ static int sigchld_pipe[2];
static int
start_new_child(int pipes[])
{
+ struct sigaction sa;
int errln = -1;
int size, res, i, pos = 0;
char *buff, *o_buff;
@@ -143,6 +144,16 @@ start_new_child(int pipes[])
/* only child executes here */
+ /* Restore default handling of sigterm... */
+ sa.sa_handler = SIG_DFL;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
+
+ if (sigaction(SIGTERM, &sa, 0) == -1) {
+ perror(NULL);
+ exit(1);
+ }
+
do {
res = read(pipes[0], (char*)&size, sizeof(size));
} while(res < 0 && (errno == EINTR || errno == ERRNO_BLOCK));