summaryrefslogtreecommitdiff
path: root/lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_monitor_3_func.txt
blob: 35cab15b0def002a433ab00e91fc2b94e0643ba6 (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
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
64
65
66

  -spec monitor(process, monitor_process_identifier(), [monitor_option()]) ->
                   MonitorRef
                   when MonitorRef :: reference();
               (port, monitor_port_identifier(), [monitor_option()]) ->
                   MonitorRef
                   when MonitorRef :: reference();
               (time_offset, clock_service, [monitor_option()]) ->
                   MonitorRef
                   when MonitorRef :: reference().

Since:
  OTP @OTP-16718@

  Types:
    -type monitor_port_identifier() :: port() | registered_name().
    -type monitor_process_identifier() ::
          pid() | registered_process_identifier().
    -type registered_name() :: atom().
    -type registered_process_identifier() ::
          registered_name() | {registered_name(), node()}.

  Provides an option list for modification of monitoring
  functionality provided by monitor/2. The Type and Item
  arguments have the same meaning as when passed to monitor/2.
  Currently available options:

  {alias, UnaliasOpt}:
    The returned monitor reference will also become an alias for
    the calling process. That is, the returned reference can be
    used for sending messages to the calling process. See also 
    alias/0. The UnaliasOpt determines how the alias should be
    deactivated.

    explicit_unalias:
      Only an explicit call to unalias/1 will deactivate the
      alias.

    demonitor:
      The alias will be automatically deactivated when the
      monitor is removed. This either via an explicit call to 
      demonitor/1 or when it is automatically removed at the
      same time as a 'DOWN' message is delivered due to the
      monitor. The alias can also still be deactivated via a
      call to unalias/1.

    reply_demonitor:
      The alias will be automatically deactivated when the
      monitor is removed (see demonitor option above) or a
      reply message sent via the alias is received. When a reply
      message is received via the alias the monitor will also be
      automatically removed. This is useful in client/server
      scenarios when a client monitors the server and will get
      the reply via the alias. Once the response is received
      both the alias and the monitor will be automatically
      removed regardless of whether the response is a reply or a 
      'DOWN' message. The alias can also still be deactivated
      via a call to unalias/1. Note that if the alias is
      removed using the unalias/1 BIF, the monitor will still
      be left active.

  {tag, UserDefinedTag}:
    Replace the default Tag with UserDefinedTag in the 
    monitor message delivered when the monitor is triggered. For
    example, when monitoring a process, the 'DOWN' tag in the
    down message will be replaced by UserDefinedTag.