io:format("string: ~s", ["yes\r\n"]). The first 's'
disappeared. This has been fixed.
xterm
terminal emulator. This has been fixed.
erl option -compile was used with
no arguments, an incomprehensible error message was
given.
(For example, the call erl -compile -S file.erl
may be thought to compile file.erl with the -S
option, but it doesn't, since erl command-line options
cannot take other options as arguments.)
a =< 1.0
used to return false instead of true.
The operator == used to work like =:= inside
lists and tuples; for example, {42} == {42.0} used to
return false instead of the correct true.
erl from
a Bourne shell on Solaris 2.6 or 2.7. This is now corrected.
erlang:monitor/2 and erlang:demonitor/1
have been changed since release R5A: an info field
containing the exit reason has been
added to the message sent when a monitored process exits;
erlang:demonitor(Ref) can only be performed by the
process which obtained Ref by calling
erlang:monitor/2.
funs can now "survive" a code change,
that is, a fun defined in the old version of
a module can now be called. In previous versions of
Beam and in Jam, only funs in the current version
of a module could be called.
error_handler module has been extended
with an undefined_lambda/3 function,
which will be called if an attempt is made to call
a fun that is defined in a module that is not
loaded. This new function will only be called in Beam.
Funs in Beam are also faster than in previous
versions.
nocatch, the BEAM
emulator now reports this to the error logger, which
it did not previously do. The JAM emulator always did.
halt() hanged indefinitely if Erlang was
started
with -noinput/-noshell and read-only port
programs had been started (for example when using
gs:start()).
erl -compile" exited with exit code 0 even if
compilation failed. Now failing compilation causes non-zero
exit code. Note that any trailing '-s' commands will
no longer be executed.
erlang:system_flag(keep_zombies, N) sets
the number of zombie processes to keep (default is 0).
Zombies are invisible to most BIFs, except processes/0,
and process_info/[1,2]. In order to check whether a
process is alive, the test
process_info(Pid,status)==undefined no longer works;
the new BIF is_process_alive/1 should be used instead.
In the c module, the new function zi/0 lists
zombies as well as living processes.
The number of zombies to keep can also be set with the
kernel application environment variable keep_zombies.
exit_status has been added to
open_port/2, to be used when spawning external
programs. When the external process connected to the
port exits, a message of the form {Port, {exit_status,
Status}} is sent to the connected process, where
Status is the exit status of the external process.
erlang:port_info(Port, id));
references are printed with their node and the sequential
number which identifies them.
Examples: #Bin<216>, #Port<0.5>,
#Ref<0.117>.
erl -noshell from
the shell, 2 jam processes (or beam) was created. This
was not an error but it was unnecessary in this case.
The extra tiny jam process is no longer created in this
case.
erlang:monitor/2 and
erlang:demonitor/1 have been introduced, for monitoring
the exit of processes.
erlang:monitor/2 and erlang:demonitor/1 are
likely to change somewhat in release R5B; they are present
now for the functionality to be tested. The exact format
of the monitoring messages may change, and restrictions may
be imposed on which process can turn off a monitoring.
ets updates:
A new ets data-type ordered_set is added, which keeps objects in erlang
term order.ets:rename is added.ets:update_conter/3 function.
-instr option) now includes
the statistics in the Erlang crash dump when one is
produced.
process_display/2 has been introduced, which
prints process information to standard error. Currently,
it can be used for inspecting the stack of a process.
erlang:process_display(Pid, backtrace));
the size of message buffer data; active monitors (see
erlang:monitor/2) in the list of links;
active timers.
erlang:trace/3 no longer returns false for any
arguments; it exits with badarg in all cases when the
trace request couldn't be honoured.
The documentation has been improved somewhat.
There is a guard test function/1 for testing whether
a term is a fun. Note that
since funs are currently represented as tuples, testing for
fun should be done before testing for tuple.
The operator ++ performs list concatenation.
The operators not, and, or and
xor operate on Boolean values.
The unary operator bnot performs a bitwise 'not' on
an integer.
Own Id: OTP-3066
setuid_socket_wrap utility
that binds privileged ports
(as root) and passes these ports to the Erlang emulator
is now included in OTP for the UNIX platforms.
The file can be found at
$(ERL_ROOT)/erts-4.8/src/setuid_socket_wrap.c.