aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWasif Malik <[email protected]>2015-02-21 22:03:37 +0100
committerWasif Malik <[email protected]>2015-03-31 20:33:10 +0200
commitcc454f6abfe284420f05bfecf3eb61ef1576cd65 (patch)
treeb8fcf23709355d5d8dacb0a82bc74c04d3116efa
parentf473c64efaf61cb89b35934725e14b5a026f264c (diff)
downloadotp-cc454f6abfe284420f05bfecf3eb61ef1576cd65.tar.gz
otp-cc454f6abfe284420f05bfecf3eb61ef1576cd65.tar.bz2
otp-cc454f6abfe284420f05bfecf3eb61ef1576cd65.zip
Fix Host and Name type in slave.erl
In the start/1,2,3 and start_link/1,2,3 functions, the Host and Name arguments can be either string() or atom() but the specs only mentioned atom().
-rw-r--r--lib/stdlib/src/slave.erl20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/stdlib/src/slave.erl b/lib/stdlib/src/slave.erl
index 1898dc8aba..d270ea222f 100644
--- a/lib/stdlib/src/slave.erl
+++ b/lib/stdlib/src/slave.erl
@@ -128,7 +128,7 @@ relay1(Pid) ->
%% {error, {already_running, Name@Host}}
-spec start(Host) -> {ok, Node} | {error, Reason} when
- Host :: atom(),
+ Host :: inet:hostname(),
Node :: node(),
Reason :: timeout | no_rsh | {already_running, Node}.
@@ -138,8 +138,8 @@ start(Host) ->
start(Host, Name, [], no_link).
-spec start(Host, Name) -> {ok, Node} | {error, Reason} when
- Host :: atom(),
- Name :: atom(),
+ Host :: inet:hostname(),
+ Name :: atom() | string(),
Node :: node(),
Reason :: timeout | no_rsh | {already_running, Node}.
@@ -147,8 +147,8 @@ start(Host, Name) ->
start(Host, Name, []).
-spec start(Host, Name, Args) -> {ok, Node} | {error, Reason} when
- Host :: atom(),
- Name :: atom(),
+ Host :: inet:hostname(),
+ Name :: atom() | string(),
Args :: string(),
Node :: node(),
Reason :: timeout | no_rsh | {already_running, Node}.
@@ -157,7 +157,7 @@ start(Host, Name, Args) ->
start(Host, Name, Args, no_link).
-spec start_link(Host) -> {ok, Node} | {error, Reason} when
- Host :: atom(),
+ Host :: inet:hostname(),
Node :: node(),
Reason :: timeout | no_rsh | {already_running, Node}.
@@ -167,8 +167,8 @@ start_link(Host) ->
start(Host, Name, [], self()).
-spec start_link(Host, Name) -> {ok, Node} | {error, Reason} when
- Host :: atom(),
- Name :: atom(),
+ Host :: inet:hostname(),
+ Name :: atom() | string(),
Node :: node(),
Reason :: timeout | no_rsh | {already_running, Node}.
@@ -176,8 +176,8 @@ start_link(Host, Name) ->
start_link(Host, Name, []).
-spec start_link(Host, Name, Args) -> {ok, Node} | {error, Reason} when
- Host :: atom(),
- Name :: atom(),
+ Host :: inet:hostname(),
+ Name :: atom() | string(),
Args :: string(),
Node :: node(),
Reason :: timeout | no_rsh | {already_running, Node}.