aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/unix/sys.c
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2017-04-21 17:46:20 +0200
committerErlang/OTP <[email protected]>2017-04-21 17:46:20 +0200
commitb04b835572e8f737d7437b2fa706652fb7e3e311 (patch)
tree92dd3a36bec3f40d20fd8fe2aa95cd2c48e63d12 /erts/emulator/sys/unix/sys.c
parentd25ad84195ca42969fbfb017a52aab8c8effc246 (diff)
parent4c408d98127c3a44f47b86e89d2a0bd5567b1e70 (diff)
downloadotp-b04b835572e8f737d7437b2fa706652fb7e3e311.tar.gz
otp-b04b835572e8f737d7437b2fa706652fb7e3e311.tar.bz2
otp-b04b835572e8f737d7437b2fa706652fb7e3e311.zip
Merge branch 'rickard/sigterm/OTP-14358' into maint-19
* rickard/sigterm/OTP-14358: Do not ignore SIGTERM when VM has been started with +Bi
Diffstat (limited to 'erts/emulator/sys/unix/sys.c')
-rw-r--r--erts/emulator/sys/unix/sys.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index 55411f83d0..3010af44be 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -791,10 +791,14 @@ static RETSIGTYPE do_quit(int signum)
/* Disable break */
void erts_set_ignore_break(void) {
- sys_signal(SIGINT, SIG_IGN);
- sys_signal(SIGTERM, SIG_IGN);
- sys_signal(SIGQUIT, SIG_IGN);
- sys_signal(SIGTSTP, SIG_IGN);
+ /*
+ * Ignore signals that can be sent to the VM by
+ * typing certain key combinations at the
+ * controlling terminal...
+ */
+ sys_signal(SIGINT, SIG_IGN); /* Ctrl-C */
+ sys_signal(SIGQUIT, SIG_IGN); /* Ctrl-\ */
+ sys_signal(SIGTSTP, SIG_IGN); /* Ctrl-Z */
}
/* Don't use ctrl-c for break handler but let it be
@@ -818,7 +822,6 @@ void erts_replace_intr(void) {
void init_break_handler(void)
{
sys_signal(SIGINT, request_break);
- sys_signal(SIGTERM, request_stop);
#ifndef ETHR_UNUSABLE_SIGUSRX
sys_signal(SIGUSR1, user_signal1);
#endif /* #ifndef ETHR_UNUSABLE_SIGUSRX */
@@ -832,6 +835,12 @@ void sys_init_suspend_handler(void)
#endif
}
+void
+erts_sys_unix_later_init(void)
+{
+ sys_signal(SIGTERM, request_stop);
+}
+
int sys_max_files(void)
{
return(max_files);