summaryrefslogtreecommitdiff
path: root/lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_register_2_func.txt
blob: aa1ea7ef8d0363cea02f732ae2f853b4bf99a4f1 (plain)
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

  -spec register(RegName, PidOrPort) -> true
                    when RegName :: atom(), PidOrPort :: port() | pid().

  Associates the name RegName with a process identifier (pid) or a
  port identifier. RegName, which must be an atom, can be used
  instead of the pid or port identifier in send operator (RegName !
  Message). Example:

    > register(db, Pid).
    true

  Failures:

  badarg:
    If PidOrPort is not an existing local process or port.

  badarg:
    If RegName is already in use.

  badarg:
    If the process or port is already registered (already has a
    name).

  badarg:
    If RegName is the atom undefined.