File: unknown_erlang_halt_func.txt

package info (click to toggle)
erlang 1%3A27.3.4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 225,000 kB
  • sloc: erlang: 1,658,966; ansic: 405,769; cpp: 177,850; xml: 82,435; makefile: 15,031; sh: 14,401; lisp: 9,812; java: 8,603; asm: 6,541; perl: 5,836; python: 5,484; sed: 72
file content (125 lines) | stat: -rw-r--r-- 4,025 bytes parent folder | download | duplicates (2)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

  halt()

  Equivalent to calling halt(0, []).

  For example:

    > halt().
    os_prompt%

  halt(HaltType)

  Equivalent to calling halt(HaltType, []).

  For example:

    > halt(17).
    os_prompt% echo $?
    17
    os_prompt%

  halt/2

Since:
  OTP R15B01

  Halt the runtime system.

   •   halt(Status :: non_neg_integer(), Options :: halt_options())

     Halt the runtime system with status code Status.

  Note

       On many platforms, the OS supports only status codes
       0-255. A too large status code is truncated by clearing
       the high bits.

     Currently the following options are valid:

      ○ {flush, EnableFlushing} - If EnableFlushing equals 
        true, which also is the default behavior, the runtime
        system will perform the following operations before
        terminating:

         ◼ Flush all outstanding output.

         ◼ Send all Erlang ports exit signals and wait for
           them to exit.

         ◼ Wait for all async threads to complete all
           outstanding async jobs.

         ◼ Call all installed NIF on halt callbacks.

         ◼ Wait for all ongoing NIF calls with the delay
           halt setting enabled to return.

         ◼ Call all installed atexit/on_exit callbacks.

        If EnableFlushing equals false, the runtime system
        will terminate immediately without performing any of
        the above listed operations.

  Change

          Runtime systems prior to OTP 26.0 called all
          installed atexit/on_exit callbacks also when 
          flush was disabled, but as of OTP 26.0 this is no
          longer the case.

      ○ {flush_timeout, Timeout :: 0..2147483647 | infinity} -
        Sets a limit on the time allowed for flushing prior to
        termination of the runtime system. Timeout is in
        milliseconds. The default value is determined by the
        the erl +zhft <Timeout> command line flag.

        If flushing has been ongoing for Timeout
        milliseconds, flushing operations will be interrupted
        and the runtime system will immediately be terminated
        with the exit code 255. If flushing is not enabled,
        the timeout will have no effect on the system.

        See also the erl +zhft <Timeout> command line
        flag. Note that the shortest timeout set by the
        command line flag and the flush_timeout option will
        be the actual timeout value in effect.

        Since: OTP 27.0

   •   halt(Abort :: abort, Options :: halt_options())

     Halt the Erlang runtime system by aborting and produce a
     core dump if core dumping has been enabled in the
     environment that the runtime system is executing in.

  Note

       The {flush, boolean()} option will be ignored, and
       flushing will be disabled.

   •   halt(CrashDumpSlogan :: string(), Options :: halt_options())

     Halt the Erlang runtime system and generate an Erlang crash
     dump. The string CrashDumpSlogan will be used as slogan in
     the Erlang crash dump created. The slogan will be trunkated
     if CrashDumpSlogan is longer than 1023 characters.

  Note

       The {flush, boolean()} option will be ignored, and
       flushing will be disabled.

  Change

       Behavior changes compared to earlier versions:

        ○ Before OTP 24.2, the slogan was truncated if 
          CrashDumpSlogan was longer than 200 characters.
          Now it will be truncated if longer than 1023
          characters.

        ○ Before OTP 20.1, only code points in the range
          0-255 were accepted in the slogan. Now any Unicode
          string is valid.