This document describes the changes made to the Kernel application.
inet:gethostbyname() functions were eliminated. If
the internal process (inet_gethost_native) had not
previously been started, and if several processes at the
same time called one of the inet:gethostbyname()
functions, the calls could fail.
ets:file2tab/1 reports no error when the argument
is not a well-formed disk log file. (The return value has
not been changed, it is still an error tuple.)erlang:spawn_monitor/1,3,
and the new option monitor for
spawn_opt/2,3,4,5.observer_backend module has been updated to
handle the new BIFs.lists:prefix/2 and
lists:suffix/2 are documented to only accept lists
as their arguments, but they actually accepted anything
and returned false. That has been changed so that
the functions cause an exception if one or both arguments
are not lists.string:strip/3 function is documented
to take a character argument that is a character to strip
from one or both ends of the string. Given a list instead
of a character, it used to do nothing, but will now cause
an exception.
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.
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.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.
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 ***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.list_to_atom/1 has been removed
from the primitive error_logger event handler.
(Thanks Serge Aleynikov for pointing this out).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.start and stop
functions in the erl_ddll module has been removed,
as those functions are not meant to be used by other
applications.erl_ddll:stop/1 function no longer
terminates the erl_ddll server, as that would
terminate the entire runtime system.
application_master.global_multi_name_action can be given the value
allow.erlang.erl file was compiled has been
eliminated.auth module API is deprecated.erlang:demonitor/2, making it possible to at
the same time flush a received 'DOWN' message, if
there is one. See erlang(3).
{'DOWN', ...} message was
left by inet_gethost_native, that caused problems
for the starting code server.
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.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.start/* functions in both
code.erl and code_server.erl and no longer
exports the init function from
code_server.erl.
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..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"}.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.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.-boot_var option, the emulator would refuse to
start with a confusing error message. Corrected to show a
clear, understandable message.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.)
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.app1 fails
to start, the slogan now will be: "Kernel pid
terminated (application_controller)
({application_start_failure,app1,{shutdown,
{app1,start,[normal,[]]}}})"Kernel pid terminated
(application_controller) (shutdown)".
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.
erlang:link/1 corrected-code_path_cache addederl command line flags clarificationsnet_kernel(3) clarifications
global(3)):nodedown was immediately followed by a
nodeup;
global no longer supports nodes
running Erlang/OTP R7B or earlier.global:set_lock/3 and
global:trans/4 now accept the value 0
(zero) of the Retries argument.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.{ok,Addr} = inet:getaddr(localhost, inet6),
gen_tcp:connect(Addr, 7, [inet6])
zlib
module has been updated in an incompatible way and many
bugs have been corrected. It is now also documented.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.
application_starter).priority and tos for
platforms that support them (currently only Linux).
inet_gethost_native:control(Control)Control = {debug_level,Level} | soft_restartLevel = integer() in the range 0-4.
application:start returning an
erroneous value, or even hang.
erts:info/1 has been corrected.erlang:statistics/1 now
lists all possible arguments.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.
fun M:F/A
construct.lists module no
longer accept bad funs under any circumstances.
'lists:map(bad_fun, [])' used to return
'[]' but now causes an exception.ets
module was removed. (Thanks to Dialyzer.)-config flag) has been added.
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.)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.){packet,http} for gen_tcp.
(Thanks to Claes Wikstrom and Luke Gorrie.)gen_tcp:recv/2, the Length to receive.
erlang:port_info/1 BIF is now documented. Minor
corrections of the documentation for
erlang:port_info/2.math module
that all functions are not available on all platforms.+c option in
the erl man page in the ERTS documentation.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.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.)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)).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.
inet_db:getbyname ends
up building an infinite list. This has been fixed.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.
net_kernel could
emit spurious nodedown messages. This bug has been fixed.
keep_zombies
configuration parameter in the kernel man page.
init and prim_file modules.inet_config now also checks the environment variable
ERL_INETRC for a possible user configuration file.
See the ERTS User's Guide for details.
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.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.
erlang:binary_to_float/1 deleted.
The BIF itself was removed several releases ago.apply/2 and
apply/3.
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.
erlang:raise/3 has been added. See the manual
for details. It is intended for internal system programming
only, advanced error handling.
-eval flag (erl -eval Expr), an
arbitrary expression can be evaluated during system
initialization. This is documented in init(3).socks5,
socks5_auth, socks5_tcp, and socks5_udp
have been removed.
auth:open/1 function
which no longer exists has been removed. (Thanks to
Miguel Barreiro.)crc32/3 function in the undocumented
and unsupported zlib module.
-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/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.list_to_binary/1,
port_command/2, port_control/3.is_* BIFs (such as
is_atom/1) has been added.erlang:float_to_binary/2 which was removed from
the run-time system several releases ago.