aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-09-12 14:41:05 +0200
committerRickard Green <[email protected]>2018-09-12 14:41:05 +0200
commit6d665a8296999822e4d516343d0e21ed62e70b37 (patch)
tree924754f136b6e188163a275a5ffdcf6b7e69f3ff /erts/emulator/sys
parent72a9c61b043dd12b6871248b6b353b333b1bc30b (diff)
parent333e4c5a1406cdeb9d1d5cf9bf4a4fadb232fca8 (diff)
downloadotp-6d665a8296999822e4d516343d0e21ed62e70b37.tar.gz
otp-6d665a8296999822e4d516343d0e21ed62e70b37.tar.bz2
otp-6d665a8296999822e4d516343d0e21ed62e70b37.zip
Merge branch 'maint-21' into maint
* maint-21: 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));