aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2017-06-07 15:19:27 +0200
committerErlang/OTP <[email protected]>2017-06-07 15:19:27 +0200
commit14981f0656559c21985544fcfe2fe2e66e051e34 (patch)
treef826365f5096223bf248a4ff4bffb06a6e6f24ff /erts
parentc64686a632a550b7c227307ec9af43857c2fd6d9 (diff)
parent8c807c89fd93ac60137c72ce597759b697ac0ec7 (diff)
downloadotp-14981f0656559c21985544fcfe2fe2e66e051e34.tar.gz
otp-14981f0656559c21985544fcfe2fe2e66e051e34.tar.bz2
otp-14981f0656559c21985544fcfe2fe2e66e051e34.zip
Merge branch 'lukas/erts/fix_zz_sigterm_kill/OTP-14451' into maint-19
* lukas/erts/fix_zz_sigterm_kill/OTP-14451: erts: Fix so that 81b628 (sigterm=kill) works
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/sys/unix/sys.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index de8481b206..7f738751ff 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -838,11 +838,13 @@ void sys_init_suspend_handler(void)
void
erts_sys_unix_later_init(void)
{
- char env[4];
+ char env[5];
size_t envsz = sizeof(env);
+
if (erts_sys_getenv_raw("ERL_ZZ_SIGTERM_KILL", env, &envsz) == 0)
- if (envsz == 4 && sys_strncmp("true",env,4) == 0)
+ if (envsz == 4 && sys_strncmp("true", env, 4) == 0)
return;
+
sys_signal(SIGTERM, request_stop);
}