aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2017-06-02 10:38:13 +0200
committerErlang/OTP <[email protected]>2017-06-02 10:38:13 +0200
commit13b3ff0f9b45e61c071ddbec2ce45345fddecefe (patch)
treef73184f9afc15e6b07a3b6745a1f43063dfba200
parentf954cdea9b67369185094a3aea7cb611dd680b3c (diff)
parent81b62880e3768dcd161f107f766f3e6e89d59446 (diff)
downloadotp-13b3ff0f9b45e61c071ddbec2ce45345fddecefe.tar.gz
otp-13b3ff0f9b45e61c071ddbec2ce45345fddecefe.tar.bz2
otp-13b3ff0f9b45e61c071ddbec2ce45345fddecefe.zip
Merge branch 'lukas/erts/restore-sigterm-default/OTP-14418' into maint-19
* lukas/erts/restore-sigterm-default/OTP-14418: erts: Add undocumented option to do default SIGTERM
-rw-r--r--erts/emulator/sys/unix/sys.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index 3010af44be..de8481b206 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -838,6 +838,11 @@ void sys_init_suspend_handler(void)
void
erts_sys_unix_later_init(void)
{
+ char env[4];
+ 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)
+ return;
sys_signal(SIGTERM, request_stop);
}