aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/register.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-04-13 18:03:33 +0200
committerBjörn-Egil Dahlberg <[email protected]>2017-01-05 10:29:45 +0100
commitc9060f9b4289bf9a669ac651a1a7aeb97a28652c (patch)
tree82fba1108c2c149ea9ecbb10f10b85b53261ee1d /erts/emulator/beam/register.c
parentdc72c879b68fdf96edfec360e8c311ff7389ecc6 (diff)
downloadotp-c9060f9b4289bf9a669ac651a1a7aeb97a28652c.tar.gz
otp-c9060f9b4289bf9a669ac651a1a7aeb97a28652c.tar.bz2
otp-c9060f9b4289bf9a669ac651a1a7aeb97a28652c.zip
erts: Add SIGHUP signal handler
A received SIGHUP signal to beam will generate a '{notify, sighup}' message to the registered process 'erl_signal_server'. 'erl_signal_server' is a gen_event process.
Diffstat (limited to 'erts/emulator/beam/register.c')
-rw-r--r--erts/emulator/beam/register.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/erts/emulator/beam/register.c b/erts/emulator/beam/register.c
index acda51c9fc..7f60710124 100644
--- a/erts/emulator/beam/register.c
+++ b/erts/emulator/beam/register.c
@@ -272,13 +272,13 @@ erts_whereis_name_to_id(Process *c_p, Eterm name)
int ix;
HashBucket* b;
#ifdef ERTS_SMP
- ErtsProcLocks c_p_locks = c_p ? ERTS_PROC_LOCK_MAIN : 0;
-
-#ifdef ERTS_ENABLE_LOCK_CHECK
- if (c_p) ERTS_SMP_CHK_HAVE_ONLY_MAIN_PROC_LOCK(c_p);
-#endif
-
+ ErtsProcLocks c_p_locks = 0;
+ if (c_p) {
+ c_p_locks = ERTS_PROC_LOCK_MAIN;
+ ERTS_SMP_CHK_HAVE_ONLY_MAIN_PROC_LOCK(c_p);
+ }
reg_safe_read_lock(c_p, &c_p_locks);
+
if (c_p && !c_p_locks)
erts_smp_proc_lock(c_p, ERTS_PROC_LOCK_MAIN);
#endif