From 031f9ca91ade7fbb9e31c82545401b8a5531e539 Mon Sep 17 00:00:00 2001 From: xsipewe Date: Thu, 20 Oct 2016 11:46:03 +0200 Subject: erl_interface: Editorial changes --- lib/erl_interface/doc/src/erl_call.xml | 196 ++++++++++++++++++--------------- 1 file changed, 110 insertions(+), 86 deletions(-) (limited to 'lib/erl_interface/doc/src/erl_call.xml') diff --git a/lib/erl_interface/doc/src/erl_call.xml b/lib/erl_interface/doc/src/erl_call.xml index f8fe409560..ebd9172f98 100644 --- a/lib/erl_interface/doc/src/erl_call.xml +++ b/lib/erl_interface/doc/src/erl_call.xml @@ -28,135 +28,146 @@ Bjarne Däcker Torbjörn Törnkvist - 97-05-16 + 1997-05-16 B erl_call.xml erl_call Call/start a distributed Erlang node. -

makes it possible to start and/or communicate with - a distributed Erlang node. It is built upon the - library as an example application. Its purpose is to use an Unix shell script to interact with a distributed Erlang node. It performs all - communication with the Erlang rex server, using the standard Erlang RPC facility. It does not require any special - software to be run at the Erlang target node.

+

makes it possible to start and/or + communicate with a distributed Erlang node. It is built upon the + library as an example application. + Its purpose is to use a Unix shell script to interact with a distributed + Erlang node. It performs all communication with the Erlang + rex server, using the standard Erlang RPC facility. It does not + require any special software to be run at the Erlang target node.

+

The main use is to either start a distributed Erlang node or to make an ordinary function call. However, it is also - possible to pipe an Erlang module to and have it - compiled, or to pipe a sequence of Erlang expressions to be evaluated + possible to pipe an Erlang module to and have + it compiled, or to pipe a sequence of Erlang expressions to be evaluated (similar to the Erlang shell).

-

Options, which cause to be read, can be used with - advantage - as scripts from within (Unix) shell scripts. Another - nice use of could be from (http) CGI-bin scripts.

+ +

Options, which cause to be read, can be used + with advantage, + as scripts from within (Unix) shell scripts. Another nice use + of could be from (HTTP) CGI-bin scripts.

+ erl_call <options> Start/call Erlang. -

Each option flag is described below with its name, type and +

Starts/calls Erlang.

+

Each option flag is described below with its name, type, and meaning.

- -a [Mod [Fun [Args]]]] + -a [Mod [Fun [Args]]]] -

(optional): Applies the specified function - and returns the result. must be specified, however - start and [] are assumed for unspecified and , respectively. should - be in the same format as for . Note - that this flag takes exactly one argument, so quoting - may be necessary in order to group , - and , in a manner dependent on the behavior - of your command shell.

-

+

(Optional.) Applies the specified function + and returns the result. must be specified. + However, start and [] are assumed for unspecified + and , respectively. + is to be in the same format as for + + erlang:apply/3 in ERTS.

+

Notice that this flag takes exactly one argument, so quoting + can be necessary to group , + , and in a manner + dependent on the behavior of your command shell.

- -c Cookie + -c Cookie -

(optional): Use this option to specify a certain cookie. If no cookie is specified, the file is read and its content are used as cookie. The Erlang node we want to communicate with must have the same cookie.

+

(Optional.) Use this option to specify a certain cookie. + If no cookie is specified, the + file is read and its content is used as cookie. The Erlang node + we want to communicate with must have the same cookie.

- -d + -d -

(optional): Debug mode. This causes all IO to be output - to the file , where +

(Optional.) Debug mode. This causes all I/O to be output + to the file, where + is the node name of the Erlang node in question.

-

- -e + -e -

(optional): Reads a sequence of Erlang expressions, separated - by ',' and ended with a '.', from until - EOF (Control-D). Evaluates the expressions and returns the result from - the last expression. Returns if successful.

-

+

(Optional.) Reads a sequence of Erlang expressions, + separated by comma (,) and ended with a full stop (.), from + until EOF (Control-D). Evaluates the + expressions and returns the result from the last expression. + Returns on success.

- -h HiddenName + -h HiddenName -

(optional): Specifies the name of the hidden node +

(Optional.) Specifies the name of the hidden node that represents.

-

- -m + -m -

(optional): Reads an Erlang module from and - compiles it.

-

+

(Optional.) Reads an Erlang module from + and compiles it.

- -n Node + -n Node -

(one of is required): - Has the same meaning as and can still be used for - backwards compatibility reasons.

-

+

(One of is required.) + Has the same meaning as and can still be + used for backward compatibility reasons.

- -name Node + -name Node -

(one of is required): is the name of the node to be +

(One of is required.) + is the name of the node to be started or communicated with. It is assumed that - is started with , which means that fully - qualified long node names are used. - If the option is given, an Erlang node will (if necessary) - be started with .

-

+ is started with + , which means that fully + qualified long node names are used. If option + is specified, an Erlang node will (if + necessary) be started with .

- -q + -q -

(optional): Halts the Erlang node specified - with the -n switch. This switch overrides the -s switch.

-

+

(Optional.) Halts the Erlang node specified + with switch -n. This switch overrides switch -s.

- -r + -r -

(optional): Generates a random name of the hidden node +

(Optional.) Generates a random name of the hidden node that represents.

-

- -s + -s -

(optional): Starts a distributed Erlang node if necessary. - This means that in a sequence of calls, where the '' - and '' are constant, only the first call will start - the Erlang node. This makes the rest of the communication - very fast. This flag is currently only available on the Unix platform.

-

+

(Optional.) Starts a distributed Erlang node if + necessary. This means that in a sequence of calls, where + '' and '' are + constant, only the first call starts the Erlang node. This makes + the rest of the communication very fast. This flag is currently + only available on Unix-like platforms (Linux, Mac OS X, Solaris, + and so on).

- -sname Node + -sname Node -

(one of is required): is the name of the node to - be started or communicated with. It is assumed that is started with which means that short node names are used. - If option is given, an Erlang node will be started (if necessary) with .

-

+

(One of is required.) + is the name of the node to be started + or communicated with. It is assumed that + is started with , which means that + short node names are used. If option is + specified, an Erlang node is started (if necessary) with + .

- -v + -v -

(optional): Prints a lot of information. - This is only useful for the developer and maintainer of .

-

+

(Optional.) Prints a lot of + information. This is only useful for the developer and maintainer + of .

- -x ErlScript + -x ErlScript -

(optional): Specifies another name of the Erlang start-up script - to be used. If not specified, the standard start-up script - is used.

+

(Optional.) Specifies another name of the Erlang + startup script to be used. If not specified, the standard + startup script is used.

@@ -165,20 +176,29 @@
Examples -

Starts an Erlang node and calls .

+

To start an Erlang node and call :

+ -

Terminates an Erlang node by calling .

+ +

To terminate an Erlang node by calling + :

+ -

An apply with several arguments.

+ +

To apply with many arguments:

+ -

Evaluates a couple of expressions. The input ends with EOF (Control-D).

+ +

To evaluate some expressions + (the input ends with EOF (Control-D)):

+ -

Compiles a module and runs it. Again, the input ends with EOF (Control-D). (In the example shown, the output has been formatted afterwards).

+ +

To compile a module and run it (again, the input ends with EOF + (Control-D)):

+

(In the example, the output has been formatted afterwards.)

+