aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
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 /lib/kernel
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 'lib/kernel')
-rw-r--r--lib/kernel/src/os.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/kernel/src/os.erl b/lib/kernel/src/os.erl
index f8519d3a5e..c3ffcb3f70 100644
--- a/lib/kernel/src/os.erl
+++ b/lib/kernel/src/os.erl
@@ -29,7 +29,7 @@
-export([getenv/0, getenv/1, getenv/2, getpid/0,
perf_counter/0, perf_counter/1,
- putenv/2, system_time/0, system_time/1,
+ putenv/2, set_signal/2, system_time/0, system_time/1,
timestamp/0, unsetenv/1]).
-spec getenv() -> [string()].
@@ -104,6 +104,15 @@ timestamp() ->
unsetenv(_) ->
erlang:nif_error(undef).
+-spec set_signal(Signal, Option) -> 'ok' when
+ Signal :: 'sighup' | 'sigquit' | 'sigabrt' | 'sigalrm' |
+ 'sigterm' | 'sigusr1' | 'sigusr2' | 'sigchld' |
+ 'sigstop' | 'sigtstp',
+ Option :: 'default' | 'handle' | 'ignore'.
+
+set_signal(_Signal, _Option) ->
+ erlang:nif_error(undef).
+
%%% End of BIFs
-spec type() -> {Osfamily, Osname} when