aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/bif.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2017-01-05 17:17:52 +0100
committerBjörn-Egil Dahlberg <[email protected]>2017-02-02 09:40:27 +0100
commit120f04387ade07ef5b8b6d20a04de7d21e0c40ca (patch)
tree9346ab9a010e0c6ceeed53224b8b37c4c185545a /erts/emulator/beam/bif.c
parentafbec46949f0d31448386234efa89cec78b905e1 (diff)
downloadotp-120f04387ade07ef5b8b6d20a04de7d21e0c40ca.tar.gz
otp-120f04387ade07ef5b8b6d20a04de7d21e0c40ca.tar.bz2
otp-120f04387ade07ef5b8b6d20a04de7d21e0c40ca.zip
erts: Use generic signal handler
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r--erts/emulator/beam/bif.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index d886c2985e..452bfef71a 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -5273,7 +5273,7 @@ BIF_RETTYPE dt_restore_tag_1(BIF_ALIST_1)
SEQ_TRACE_TOKEN(BIF_P) = am_have_dt_utag;
}
}
-#else
+#else
if (BIF_ARG_1 != am_true) {
BIF_ERROR(BIF_P,BADARG);
}
@@ -5281,4 +5281,16 @@ BIF_RETTYPE dt_restore_tag_1(BIF_ALIST_1)
BIF_RET(am_true);
}
+BIF_RETTYPE erts_internal_set_signal_2(BIF_ALIST_2) {
+ if (is_atom(BIF_ARG_1) && ((BIF_ARG_2 == am_ignore) ||
+ (BIF_ARG_2 == am_default) ||
+ (BIF_ARG_2 == am_handle))) {
+ if (!erts_set_signal(BIF_ARG_1, BIF_ARG_2))
+ goto error;
+
+ BIF_RET(am_true);
+ }
+error:
+ BIF_ERROR(BIF_P, BADARG);
+}