aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2017-01-24 10:59:30 +0100
committerBjörn-Egil Dahlberg <[email protected]>2017-02-02 09:40:28 +0100
commitd4bd17da9759af54227891a90d9fb83d5bfe6d7e (patch)
treea1b75a3b750b073d46e7a34bfe4a80eddc62a02e /erts/emulator/beam
parent9ccb988eeb79815a33e0dd138278e0c29ed3ca6a (diff)
downloadotp-d4bd17da9759af54227891a90d9fb83d5bfe6d7e.tar.gz
otp-d4bd17da9759af54227891a90d9fb83d5bfe6d7e.tar.bz2
otp-d4bd17da9759af54227891a90d9fb83d5bfe6d7e.zip
erts: Use os module instead of erts_internal for set_signal/2
* Add specs * Change return signature to 'ok' instead of 'true'
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/bif.c14
-rw-r--r--erts/emulator/beam/bif.tab2
-rw-r--r--erts/emulator/beam/erl_bif_os.c14
3 files changed, 15 insertions, 15 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index 452bfef71a..1048300cf7 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -5280,17 +5280,3 @@ BIF_RETTYPE dt_restore_tag_1(BIF_ALIST_1)
#endif
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);
-}
diff --git a/erts/emulator/beam/bif.tab b/erts/emulator/beam/bif.tab
index 318a4fd264..f90fae6041 100644
--- a/erts/emulator/beam/bif.tab
+++ b/erts/emulator/beam/bif.tab
@@ -668,7 +668,7 @@ gcbif erlang:ceil/1
bif math:floor/1
bif math:ceil/1
bif math:fmod/2
-bif erts_internal:set_signal/2
+bif os:set_signal/2
#
# Obsolete
diff --git a/erts/emulator/beam/erl_bif_os.c b/erts/emulator/beam/erl_bif_os.c
index 46777d3aa5..edc3c82b23 100644
--- a/erts/emulator/beam/erl_bif_os.c
+++ b/erts/emulator/beam/erl_bif_os.c
@@ -203,3 +203,17 @@ BIF_RETTYPE os_unsetenv_1(BIF_ALIST_1)
}
BIF_RET(am_true);
}
+
+BIF_RETTYPE os_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_ok);
+ }
+
+error:
+ BIF_ERROR(BIF_P, BADARG);
+}