## 1 Kernel Release Notes

This document describes the changes made to the Kernel application.

### 1.1 Kernel 2.11.1

#### 1.1.1 Fixed Bugs and Malfunctions

- In R11B-0, the erl_ddll server process is always started. Despite that, the configuration parameter `start_ddll` for the Kernel application was still obeyed, which would cause the erl_ddll server to be started TWICE (and the system shutting down as a result). In this release, `start_ddll` is no longer used and its documentation has been removed.
  Own Id: OTP-6163
- The kernel option {dist_auto_connect,once} could block out nodes that had never been connected, causing persistent partitioning of networks. Furthermore, partial restarts of networks could cause inconsistent global name databases. Both problems are now solved.
  Own Id: OTP-6200 Aux Id: seq10377

#### 1.1.2 Improvements and New Features

- Late arriving tcp_closed and udp_closed messages are now removed from the message queue of a process calling gen_tcp:close/1, gen_udp:close/1, and inet:close/1.
  Own Id: OTP-6197

### 1.2 Kernel 2.11

#### 1.2.1 Fixed Bugs and Malfunctions

- When repairing a disk log with a corrupt index file (caused by for instance a hard disk failure) the old contents of the index file is kept unmodified. This will make repeated attempts to open the disk log fail every time.
  Own Id: OTP-5558 Aux Id: seq9823
- Previously `unlink/1` and `erlang:demonitor/2` behaved completely asynchronous. This had one undesirable effect, though. You could never know when you were guaranteed not to be affected by a link that you had unlinked or a monitor that you had demonitored.
  The new behavior of `unlink/1` and `erlang:demonitor/2` can be viewed as two operations performed atomically. Asynchronously send an unlink signal or a demonitor signal, and ignore any future results of the link or monitor.
  NOTE: This change can cause some obscure code to fail which previously did not. For example, the following code might hang:

                  Mon = erlang:monitor(process, Pid),
                  %% ...
                  exit(Pid, bang),
                  erlang:demonitor(Mon),
                  receive
                      {'DOWN', Mon, process, Pid, _} -> ok
                  %% We were previously guaranteed to get a down message
                  %% (since we exited the process ourself), so we could
                  %% in this case leave out:
                  %% after 0 -> ok
                  end,

  *** POTENTIAL INCOMPATIBILITY ***
  Own Id: OTP-5772
- The behavior when an application fails to start and possibly causes the runtime system to halt has been cleaned up, including fixing some minor bugs.
  `application_controller` should now always terminate with a non-nested string, meaning the slogan in an `erl_crash.dump` should always be easy to read.
  `init` now makes sure that the slogan passed to `erlang:halt/1` does not exceed the maximum allowed length.
  Redundant calls to `list_to_atom/1` has been removed from the primitive `error_logger` event handler. (Thanks Serge Aleynikov for pointing this out).
  The changes only affects the contents of the error messages and crashdump file slogan.
  Own Id: OTP-5964
- The `erl_ddll` server is now started when OTP is started and placed under the Kernel supervisor. This fixes several minor issues. It used to be started on demand.
  The documentation for the `start` and `stop` functions in the `erl_ddll` module has been removed, as those functions are not meant to be used by other applications.
  Furthermore, the `erl_ddll:stop/1` function no longer terminates the `erl_ddll` server, as that would terminate the entire runtime system.
  Own Id: OTP-6033

#### 1.2.2 Improvements and New Features

- Removed some unused functions from `application_master`.
  Own Id: OTP-3889
- Global no longer allows the registration of a process under more than one name. If the old (buggy) behavior is desired the Kernel application variable `global_multi_name_action` can be given the value `allow`.
  Own Id: OTP-5640 Aux Id: OTP-5603
- The (slightly misleading) warnings that was shown when the `erlang.erl` file was compiled has been eliminated.
  Own Id: OTP-5947
- The `auth` module API is deprecated.
  Own Id: OTP-6037
- Added `erlang:demonitor/2`, making it possible to at the same time flush a received `'DOWN'` message, if there is one. See `erlang(3)`.
  Own Id: OTP-6100 Aux Id: OTP-5772

### 1.3 Kernel 2.10.13

#### 1.3.1 Fixed Bugs and Malfunctions

- Large files (more than 2 GBytes) are now handled on Solaris 8.
  Own Id: OTP-5849 Aux Id: seq10157
- During startup, a garbage `{'DOWN', ...}` message was left by `inet_gethost_native`, that caused problems for the starting code server.
  Own Id: OTP-5978 Aux Id: OTP-5974

#### 1.3.2 Improvements and New Features

- `global` now makes several attempts to connect nodes when maintaining the fully connected network. More than one attempt is sometimes needed under very heavy load.
  Own Id: OTP-5889
- `erl_epmd` now explicitly sets the timeout to `infinity` when calling `gen_server:call`. The old timeout of 15 seconds could time out under very heavy load.
  Own Id: OTP-5959
- Corrected the start of code server to use reference-tagged tuples to ensure that an unexpected message sent to the parent process does not cause a halt of the system. Also removed the useless `start/*` functions in both `code.erl` and `code_server.erl` and no longer exports the `init` function from `code_server.erl`.
  Own Id: OTP-5974 Aux Id: seq10243, OTP-5978

### 1.4 Kernel 2.10.12

#### 1.4.1 Fixed Bugs and Malfunctions

- A bug in `global` has been fixed: the locker process added `nonode@nohost` to the list of nodes to lock. This could happen before any nodes got known to the global name server. Depending on net configuration the symptom was a delay.
  Own Id: OTP-5792 Aux Id: OTP-5563
- If an `.app` file is missing, the error reason returned by `application:load/1` has been corrected to `{"no such file or directory", "FILE.app"}`, instead of the less informative `{"unknown POSIX error","FILE.app"}`.
  Own Id: OTP-5809
- Bug fixes: `disk_log:accessible_logs/0` no longer reports all `pg2` process groups as distributed disk logs; `disk_log:pid2name/1` did not recognize processes of distributed disk logs.
  Own Id: OTP-5810
- The functions `file:consult/1`, `file:path_consult/2`, `file:eval/1,2`, `file:path_eval/2,3`, `file:script/1,2`, `file:path_script/2,3` now return correct line numbers in error tuples.
  Own Id: OTP-5814
- If there were user-defined variables in the boot script, and their values were not provided using the `-boot_var` option, the emulator would refuse to start with a confusing error message. Corrected to show a clear, understandable message.
  The `prim_file` module was modified to not depend on the `lists` module, to make it possible to start the emulator using a user-defined loader. (Thanks to Martin Bjorklund.)
  Own Id: OTP-5828 Aux Id: seq10151
- Minor corrections in the description of open modes. (Thanks to Richard Carlsson.)
  Own Id: OTP-5856

#### 1.4.2 Improvements and New Features

- `application_controller` now terminates with the actual error reason, instead of `shutdown`. This means that the crash dump now should be somewhat more informative, in the case where the runtime system is terminated due to an error in an application.
  Example: If the (permanent) application `app1` fails to start, the slogan now will be: "`Kernel pid terminated (application_controller) ({application_start_failure,app1,{shutdown, {app1,start,[normal,[]]}}})`"
  rather than the previous "`Kernel pid terminated (application_controller) (shutdown)`".
  Own Id: OTP-5811

### 1.5 Kernel 2.10.11.1

#### 1.5.1 Fixed Bugs and Malfunctions

- Timers could sometimes timeout too early. This bug has now been fixed.
  Automatic cancellation of timers created by `erlang:send_after(Time,` pid(), Msg), and `erlang:start_timer(Time,` pid(), Msg) has been introduced. Timers created with the receiver specified by a pid, will automatically be cancelled when the receiver exits. For more information see the `erlang(3)` man page.
  In order to be able to maintain a larger amount of timers without increasing the maintenance cost, the internal timer wheel and bif timer table have been enlarged.
  Also a number of minor bif timer optimizations have been implemented.
  Own Id: OTP-5795 Aux Id: OTP-5090, seq8913, seq10139, OTP-5782

#### 1.5.2 Improvements and New Features

- Documentation improvements:
  - documentation for `erlang:link/1` corrected
  - command line flag `-code_path_cache` added
  - `erl` command line flags clarifications
  - `net_kernel(3)` clarifications
  Own Id: OTP-5847

### 1.6 Kernel 2.10.11

#### 1.6.1 Fixed Bugs and Malfunctions

- Several bug fixes and improvements in the global name registration facility (see `global(3)`):
  - the name resolving procedure did not always unlink no longer registered processes;
  - the global name could sometimes hang when a `nodedown` was immediately followed by a `nodeup`;
  - global names were not always unregistered when a node went down;
  - it is now possible to set and delete locks at the same time as the global name server is resolving names--the handling of global locks has been separated from registration of global names;
  As of this version, `global` no longer supports nodes running Erlang/OTP R7B or earlier.
  *** POTENTIAL INCOMPATIBILITY ***
  Own Id: OTP-5563
- The functions `global:set_lock/3` and `global:trans/4` now accept the value `0` (zero) of the `Retries` argument.
  Own Id: OTP-5737
- The `inet:getaddr(Addr, Family)` no longer validates the `Addr` argument if it is a 4 or 8 tuple containing the IP address, except for the size of the tuple and that it contains integers in the correct range.
  The reason for the change is that validation could cause the following sequence of calls to fail:
  `{ok,Addr} = inet:getaddr(localhost, inet6), gen_tcp:connect(Addr, 7, [inet6])`
  Own Id: OTP-5743

#### 1.6.2 Improvements and New Features

- The previously undocumented and UNSUPPORTED `zlib` module has been updated in an incompatible way and many bugs have been corrected. It is now also documented.
  *** POTENTIAL INCOMPATIBILITY ***
  Own Id: OTP-5715
- Added `application` interface functions `which_applications/1`, `set_env/4` and `unset_env/3`, which take an additional `Timeout` argument. To be used in situations where the standard gen_server timeout (5000ms) is not adequate.
  Own Id: OTP-5724 Aux Id: seq10083
- Improved documentation regarding synchronized start of applications with included applications (using start phases and `application_starter`).
  Own Id: OTP-5754
- New socket options `priority` and `tos` for platforms that support them (currently only Linux).
  Own Id: OTP-5756
- The global name server has been optimized when it comes to maintaining a fully connected network.
  Own Id: OTP-5770

### 1.7 Kernel 2.10.10.1

#### 1.7.1 Fixed Bugs and Malfunctions

- The native resolver has gotten an control API for extended debugging and soft restart. It is: `inet_gethost_native:control(Control)`
  `Control = {debug_level,Level} | soft_restart`
  `Level = integer() in the range 0-4`.
  Own Id: OTP-5751 Aux Id: EABln25013

### 1.8 Kernel 2.10.10

#### 1.8.1 Fixed Bugs and Malfunctions

- If several processes (at the same node) simultaneously tried to start the same distributed application, this could lead to `application:start` returning an erroneous value, or even hang.
  Own Id: OTP-5606 Aux Id: seq9838

#### 1.8.2 Improvements and New Features

- The manual pages for most of the Kernel and some of the STDLIB modules have been updated, in particular regarding type definitions.
  The documentation of the return value for `erts:info/1` has been corrected.
  The documentation for `erlang:statistics/1` now lists all possible arguments.
  Own Id: OTP-5360
- When the native resolver fails a `gethostbyaddr` lookup, `nxdomain` should be returned. There should be no attempt to fallback on a routine that succeeds if only the syntax of the IP address is valid. This has been fixed.
  Own Id: OTP-5598 Aux Id: OTP-5576
- Replaced some tuple funs with the new `fun M:F/A` construct.
  The high-order functions in the `lists` module no longer accept bad funs under any circumstances. '`lists:map(bad_fun, [])`' used to return '`[]`' but now causes an exception.
  Unused, broken compatibility code in the `ets` module was removed. (Thanks to Dialyzer.)
  Eliminated 5 discrepancies found by Dialyzer in the Appmon application.
  Own Id: OTP-5633
- The possibility to have comments following the list of tuples in a config file (file specified with the `-config` flag) has been added.
  Own Id: OTP-5661 Aux Id: seq10003

### 1.9 Kernel 2.10.9

#### 1.9.1 Fixed Bugs and Malfunctions

- '`erl -config sys.config`' would fail to start if the `sys.config` file did not contain any whitespace at all after the dot. (Thanks to Anders Nygren.)
  Own Id: OTP-5543
- A bug regarding tcp sockets which results in hanging `gen_tcp:send/2` has been corrected. To encounter this bug you needed one process that read from a socket, one that wrote more date than the reader read out so the sender got suspended, and then the reader closed the socket. (Reported and diagnosed by Alexey Shchepin.)
  Corrected a bug in the (undocumented and unsupported) option `{packet,http}` for `gen_tcp.` (Thanks to Claes Wikstrom and Luke Gorrie.)
  Updated the documentation regarding the second argument to `gen_tcp:recv/2`, the `Length` to receive.
  Own Id: OTP-5582 Aux Id: seq9839

#### 1.9.2 Improvements and New Features

- At startup, the Erlang resolver hosts table was used to look up the name of the local (and possibly stand alone) host. This was incorrect. The configured resolver method is now used for this purpose.
  Own Id: OTP-5393
- The `erlang:port_info/1` BIF is now documented. Minor corrections of the documentation for `erlang:port_info/2`.
  Added a note to the documentation of the `math` module that all functions are not available on all platforms.
  Added more information about the `+c` option in the `erl` man page in the ERTS documentation.
  Own Id: OTP-5555
- The new `fun M:F/A` construct creates a fun that refers to the latest version of `M:F/A.` This syntax is meant to replace tuple funs `{M,F}` which have many problems.
  The new type test `is_function(Fun,A)` (which may be used in guards) test whether `Fun` is a fun that can be applied with `A` arguments. (Currently, `Fun` can also be a tuple fun.)
  Own Id: OTP-5584
- According to the documentation `global` implements the equivalent of `register/2`, which returns `badarg` if a process is already registered. As it turns out there is no check in `global` if a process is registered under more than one name. If some process is accidently or by design given several names, it is possible that the name registry becomes inconsistent due to the way the resolve function is called when name clashes are discovered (see `register_name/3` in `global(3)`).
  In OTP R11B `global` will not allow the registration of a process under more than one name. To help finding code where `no` will be returned, a Kernel application variable, `global_multi_name_action`, is hereby introduced. Depending on its value (`info`, `warning`, or `error`), messages are sent to the error logger when `global` discovers that some process is given more than one name. The variable only affects the node where it is defined.
  Own Id: OTP-5603

### 1.10 Kernel 2.10.8

#### 1.10.1 Improvements and New Features

- In case of a DNS lookup loop, `inet_db:getbyname` ends up building an infinite list. This has been fixed.
  Own Id: OTP-5449
- When doing an `inet6` name lookup on an IPv4 address it was possible to get an address on IPv4 format back. This has been corrected. Some other minor inconsistencies regarding IPv6 name lookup have also been corrected.
  Own Id: OTP-5576

### 1.11 Kernel 2.10.7

#### 1.11.1 Fixed Bugs and Malfunctions

- Under certain circumstances the `net_kernel` could emit spurious nodedown messages. This bug has been fixed.
  Own Id: OTP-5396
- Removed description of the `keep_zombies` configuration parameter in the `kernel` man page.
  Own Id: OTP-5497

#### 1.11.2 Improvements and New Features

- Eliminated Dialyzer warnings (caused by dead code) in the `init` and `prim_file` modules.
  Own Id: OTP-5496
- `inet_config` now also checks the environment variable `ERL_INETRC` for a possible user configuration file. See the ERTS User's Guide for details.
  Own Id: OTP-5512

### 1.12 Kernel 2.10.6

#### 1.12.1 Improvements and New Features

- The `c` option for the `+B` flag has been introduced which makes it possible to use Ctrl-C (Ctrl-Break on Windows) to interrupt the shell process rather than to invoke the emulator break handler. All new `+B` options are also supported on Windows (werl) as of now. Furthermore, Ctrl-C on Windows has now been reserved for copying text (what Ctrl-Ins was used for previously). Ctrl-Break should be used for break handling. Lastly, the documentation of the system flags has been updated.
  Own Id: OTP-5388
- The possibility to start the Erlang shell in parallel with the rest of the system was reintroduced for backwards compatibility in STDLIB 1.13.1. The flag to be used for this is now called `async_shell_start` and has been documented. New shells started from the JCL menu are not syncronized with `init` anymore. This makes it possible to start a new shell (e.g. for debugging purposes) even if the initial shell has not come up.
  Own Id: OTP-5406 Aux Id: OTP-5218

### 1.13 Kernel 2.10.5

#### 1.13.1 Fixed Bugs and Malfunctions

- Documentation for `erlang:binary_to_float/1` deleted. The BIF itself was removed several releases ago.
  Updated documentation for `apply/2` and `apply/3`.
  Own Id: OTP-5391

#### 1.13.2 Improvements and New Features

- `net_kernel:monitor_nodes/2` which takes a flag and an option list has been added. By use of `net_kernel:monitor_nodes/2` one can subscribe for `nodeup/nodedown` messages with extra information. It is now possible to monitor hidden nodes, and get `nodedown` reason. See the `net_kernel(3)` documentation for more information.
  Own Id: OTP-5374

### 1.14 Kernel 2.10.4

#### 1.14.1 Fixed Bugs and Malfunctions

- The application master for an application now terminates the application faster, which reduces the risk for timeouts in other parts of the system.
  Own Id: OTP-5363 Aux Id: EABln19084
- A BIF `erlang:raise/3` has been added. See the manual for details. It is intended for internal system programming only, advanced error handling.
  Own Id: OTP-5376 Aux Id: OTP-5257

### 1.15 Kernel 2.10.3

#### 1.15.1 Improvements and New Features

- With the `-eval` flag (`erl -eval Expr`), an arbitrary expression can be evaluated during system initialization. This is documented in `init(3)`.
  Own Id: OTP-5260
- The unsupported and undocumented modules `socks5`, `socks5_auth`, `socks5_tcp`, and `socks5_udp` have been removed.
  Own Id: OTP-5266

### 1.16 Kernel 2.10.1

#### 1.16.1 Fixed Bugs and Malfunctions

- The Pman 'trace shell' functionality was broken and has now been fixed. Furthermore, Pman could not correctly find the pid of the active shell if more than one shell process was running on the node. This has also been corrected.
  Own Id: OTP-5191
- The documentation for the `auth:open/1` function which no longer exists has been removed. (Thanks to Miguel Barreiro.)
  Own Id: OTP-5208
- Corrected the `crc32/3` function in the undocumented and unsupported `zlib` module.
  Own Id: OTP-5227

#### 1.16.2 Improvements and New Features

- You can now start Erlang with the `-rsh` flag which gives you a remote initial shell instead of a local one. Example:

                  erl -sname this_node -rsh other_node@other_host

  Own Id: OTP-5210
- If `/etc/hosts` specified two hosts with the same IP address (on separate lines), only the last host would be registered by inet_db during inet configuration. This has been corrected now so that both aliases are registered with the same IP address.
  Own Id: OTP-5212 Aux Id: seq7128
- The documentation for BIFs that take I/O lists have been clarified. Those are `list_to_binary/1`, `port_command/2`, `port_control/3`.
  Documentation for all `is_*` BIFs (such as `is_atom/1`) has been added.
  Removed the documentation for `erlang:float_to_binary/2` which was removed from the run-time system several releases ago.
  Own Id: OTP-5222

Copyright © 1991-2006 Ericsson AB