diff options
author | Björn-Egil Dahlberg <[email protected]> | 2017-03-21 14:37:03 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2017-03-21 14:49:55 +0100 |
commit | f92d862c1af230a873c2b2d30fea575ff3dafd56 (patch) | |
tree | de8a3dac88e62cd9ff2820ba7404bf21d1e08903 /erts/emulator/beam/sys.h | |
parent | a748cafdc7063d9f181ba12088db6458793ced2f (diff) | |
download | otp-f92d862c1af230a873c2b2d30fea575ff3dafd56.tar.gz otp-f92d862c1af230a873c2b2d30fea575ff3dafd56.tar.bz2 otp-f92d862c1af230a873c2b2d30fea575ff3dafd56.zip |
erts: Make sigterm signal safe for non-smp beam
The signal handler will now schedule a sigterm message instead of sending
the message in the signal handler. The signal handler must refrain from
memory allocations and thus the event is scheduled.
Diffstat (limited to 'erts/emulator/beam/sys.h')
-rw-r--r-- | erts/emulator/beam/sys.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h index d49edad6dc..dd4f05686b 100644 --- a/erts/emulator/beam/sys.h +++ b/erts/emulator/beam/sys.h @@ -481,6 +481,12 @@ extern volatile int erts_break_requested; void erts_do_break_handling(void); #endif +#if !defined(ERTS_SMP) && !defined(__WIN32__) +extern volatile Uint erts_signal_sigterm; +#define ERTS_SIGNAL_SIGTERM erts_signal_sigterm +void erts_handle_signal_sigterm(void); +#endif + #ifdef ERTS_WANT_GOT_SIGUSR1 # ifndef UNIX # define ERTS_GOT_SIGUSR1 0 |