forked from elixir-lang/elixir
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommon
63 lines (63 loc) · 2.61 KB
/
common
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.It Fl e Ar expression
Evaluates the specified expression.
.It Fl r Ar file
Requires the specified file. In other words, the file is checked for existence at the start of
.Nm .
.It Fl S Ar script
Runs the specified script.
.It Fl pa Ar directory
Adds the specified directory to the beginning of the code path. If the directory already exists, it will be removed from its old position and put to the beginning.
.Pp
See also the function
.Sy Code.prepend_path/1 .
.It Fl pr Ar file
Does the same thing as
.Fl r
.Pq see above
but in parallel.
.It Fl pz Ar directory
Adds the specified directory to the end of the code path. If the directory already exists, it will be neither removed from its old position nor put to the end.
.Pp
See also the function
.Sy Code.append_path/1 .
.It Fl -app Ar application
Starts the specified application and all its dependencies.
.It Fl -erl Ar parameters
Serves the same purpose as ELIXIR_ERL_OPTIONS
.Pq see the Sy ENVIRONMENT No section
.It Fl -cookie Ar value
Specifies the magic cookie value. If the value isn't specified via the option when the node starts, it will be taken from the file
.Pa ~/.erlang.cookie
.Pq see the Sy FILES No section .
Distributed nodes can interact with each other only when their magic cookies are equal.
.Pp
See also the function
.Sy Node.set_cookie/2 .
.It Fl -detached
Runs the Erlang runtime system detached from the controlling terminal.
.It Fl -hidden
Starts a hidden node.
.Pp
Connections between nodes are transitive. For example, if node A is connected to node B, and node B is connected to node C, then node A is connected to node C. The option
.Fl -hidden
allows creating a node which can be connected to another node, escaping redundant connections.
.Pp
The function
.Sy Node.list/0
allows getting the list of nodes connected to the target node, however the list won't include hidden nodes. Depending on the input parameter, the function
.Sy Node.list/1
allows getting the list which contains only hidden nodes
.Pq the parameter Ar :hidden
or both hidden and not hidden nodes
.Pq the parameter Ar :connected .
.It Fl -sname Ar name
Gives a node a short name and starts it. Short names take the form of
.Ar name Ns
@host, where host is the name of the target host
.Pq Xr hostname 1
which runs the node. The nodes with short names can interact with each other only in the same local network.
.It Fl -name Ar name
Gives a node a long name and starts it. Long names take the form of
.Ar name Ns
@host, where host is the IP address of the host which runs the node. In contrast to the nodes with short names, the nodes with long names aren't limited by boundaries of a local network
.Pq see above .