31
31
<p>This document describes the changes made to the Kernel application.</p>
33
<section><title>Kernel 2.14.3</title>
35
<section><title>Fixed Bugs and Malfunctions</title>
39
<c>os:find_executable/{1,2}</c> will no longer return the
40
path of a directory that happens to be in the PATH.</p>
42
Own Id: OTP-8983 Aux Id: seq11749 </p>
46
Fix -spec for file:write_file/3</p>
48
Change type for second parameter from binary() to
49
iodata(), since the function explicitly takes steps to
50
accept lists as well as binaries. (thanks to Magnus
57
Sanitize the specs of the code module</p>
59
After the addition of unicode_binary() to the
60
file:filename() type, dialyzer started complaining about
61
erroneous or incomplete specs in some functions of the
62
'code' module. The culprit was hard-coded information in
63
erl_bif_types for functions of this module, which were
64
not updated. Since these functions have proper specs
65
these days and code duplication (pun intended) is never a
66
good idea, their type information was removed from
69
While doing this, some erroneous comments were fixed in
70
the code module and also made sure that the code now runs
71
without dialyzer warnings even when the
72
-Wunmatched_returns option is used.</p>
74
Some cleanups were applied to erl_bif_types too.</p>
80
- Add spec for function that does not return - Strenghen
81
spec - Introduce types to avoid duplication in specs -
82
Add specs for functions that do not return - Add specs
83
for behaviour callbacks - Simplify two specs</p>
92
<section><title>Kernel 2.14.2</title>
94
<section><title>Improvements and New Features</title>
98
The Erlang VM now supports Unicode filenames. The feature
99
is turned on by default on systems where Unicode
100
filenames are mandatory (Windows and MacOSX), but can be
101
enabled on other systems with the '+fnu' emulator option.
102
Enabling the Unicode filename feature on systems where it
103
is not default is however considered experimental and not
104
to be used for production. Together with the Unicode file
105
name support, the concept of "raw filenames" is
106
introduced, which means filenames provided without
107
implicit unicode encoding translation. Raw filenames are
108
provided as binaries, not lists. For further information,
109
see stdlib users guide and the chapter about using
110
Unicode in Erlang. Also see the file module manual page.</p>
112
*** POTENTIAL INCOMPATIBILITY ***</p>
118
There is now a new function inet:getifaddrs/0 modeled
119
after C library function getifaddrs() on BSD and LInux
120
that reports existing interfaces and their addresses on
121
the host. This replaces the undocumented and unsupported
122
inet:getiflist/0 and inet:ifget/2.</p>
131
<section><title>Kernel 2.14.1.1</title>
133
<section><title>Fixed Bugs and Malfunctions</title>
136
<p>In embedded mode, on_load handlers that called
137
<c>code:priv_dir/1</c> or other functions in <c>code</c>
138
would hang the system. Since the <c>crypto</c>
139
application now contains an on_loader handler that calls
140
<c>code:priv_dir/1</c>, including the <c>crypto</c>
141
application in the boot file would prevent the system
143
<p>Also extended the <c>-init_debug</c> option to print
144
information about on_load handlers being run to
145
facilitate debugging.</p>
147
Own Id: OTP-8902 Aux Id: seq11703 </p>
154
<section><title>Kernel 2.14.1</title>
156
<section><title>Fixed Bugs and Malfunctions</title>
160
Fixed: inet:setopts(S, [{linger,{true,2}}]) returned
161
{error,einval} for SCTP sockets. The inet_drv had a bug
162
when checking the option size.</p>
164
Own Id: OTP-8726 Aux Id: seq11617 </p>
168
gen_udp:connect/3 was broken for SCTP enabled builds. It
169
did not detect remote end errors as it should.</p>
174
<p>reference() has been substituted for ref() in the
180
<p>A bug introduced in kernel-2.13.5.3 has been fixed. If
181
running <c>net_kernel:set_net_ticktime/1</c> twice within
182
the <c>TransitionPerod</c> the second call caused the
183
net_kernel process to crash with a <c>badmatch</c>.</p>
185
Own Id: OTP-8787 Aux Id: seq11657, OTP-8643 </p>
189
inet:getsockopt for SCTP sctp_default_send_param had a
190
bug to not initialize required feilds causing random
191
answers. It is now corrected.</p>
193
Own Id: OTP-8795 Aux Id: seq11655 </p>
196
<p>For a socket in the HTTP packet mode, the return value
197
from <c>gen_tcp:recv/2,3</c> if there is an error in the
198
header will be <c>{ok,{http_error,String}}</c> instead of
199
<c>{error,{http_error,String}}</c> to be consistent with
200
<c>ssl:recv/2,3</c>.</p>
202
*** POTENTIAL INCOMPATIBILITY ***</p>
210
<section><title>Improvements and New Features</title>
214
Even when configuring erlang with --enable-native-libs,
215
the native code for modules loaded very early (such as
216
lists) would not get loaded. This has been corrected.
217
(Thanks to Paul Guyot.)</p>
223
The undocumented function inet:ifget/2 has been improved
224
to return interface hardware address (MAC) on platforms
225
supporting getaddrinfo() (such as BSD unixes). Note it
226
still does not work on all platforms for example not
227
Windows nor Solaris, so the function is still
230
Buffer overflow and field init bugs for inet:ifget/2 and
231
inet:getservbyname/2 has also been fixed.</p>
233
Thanks to Michael Santos.</p>
239
As a usability improvement the 'inet6' option to
240
functions gen_tcp:listen/2, gen_tcp:connect/3-4,
241
gen_udp:open/2 and gen_sctp:open/1-2 is now implicit if
242
the address argument or the 'ip' option contain an IPv6
243
address (8-tuple).</p>
252
<section><title>Kernel 2.14</title>
254
<section><title>Fixed Bugs and Malfunctions</title>
258
os:find_executable can now be fed with the complete name
259
of the executable on Windows and still find it. I.e
260
os:find_executable("werl.exe") will work as
261
os:find_executable("werl").</p>
267
The shell's line editing has been improved to more
268
resemble the behaviour of readline and other shells.
269
(Thanks to Dave Peticolas)</p>
274
<p>Under certain circumstances the net kernel could hang.
275
(Thanks to Scott Lystig Fritchie.)</p>
277
Own Id: OTP-8643 Aux Id: seq11584 </p>
281
The kernel DNS resolver was leaking one or two ports if
282
the DNS reply could not be parsed or if the resolver(s)
283
caused noconnection type errors. Bug now fixed. A DNS
284
specification borderline truncated reply triggering the
285
port leakage bug has also been fixed.</p>
293
<section><title>Improvements and New Features</title>
296
<p>As of this version, the global name server no longer
297
supports nodes running Erlang/OTP R11B.</p>
303
The file module's functions write,read and read_line now
304
handles named io_servers like 'standard_io' and
305
'standard_error' correctly.</p>
311
The functions file:advise/4 and file:datasync/1 have been
312
added. (Thanks to Filipe David Manana.)</p>
317
<p>When exchanging groups between nodes <c>pg2</c> did
318
not remove duplicated members. This bug was introduced in
319
R13B03 (kernel-2.13.4).</p>
325
There is a new option 'exclusive' to file:open/2 that
326
uses the OS O_EXCL flag where supported to open the file
327
in exclusive mode.</p>
336
<section><title>Kernel 2.13.5.3</title>
338
<section><title>Fixed Bugs and Malfunctions</title>
342
A bug introduced in Kernel 2.13.5.2 has been fixed.</p>
344
Own Id: OTP-8686 Aux Id: OTP-8643</p>
351
<section><title>Kernel 2.13.5.2</title>
353
<section><title>Fixed Bugs and Malfunctions</title>
357
Under certain circumstances the net kernel could hang.
358
(Thanks to Scott Lystig Fritchie.)</p>
360
Own Id: OTP-8643 Aux Id: seq11584</p>
367
<section><title>Kernel 2.13.5.1</title>
369
<section><title>Fixed Bugs and Malfunctions</title>
373
A race condition in <c>os:cmd/1</c> could cause the
374
caller to get stuck in <c>os:cmd/1</c> forever.</p>
383
<section><title>Kernel 2.13.5</title>
385
<section><title>Fixed Bugs and Malfunctions</title>
388
<p>A race bug affecting <c>pg2:get_local_members/1</c>
389
has been fixed. The bug was introduced in R13B03.</p>
395
The loading of native code was not properly atomic in the
396
SMP emulator, which could cause crashes. Also a per-MFA
397
information table for the native code has now been
398
protected with a lock since it turns that it could be
399
accessed concurrently in the SMP emulator. (Thanks to
400
Mikael Pettersson.)</p>
406
user.erl (used in oldshell) is updated to handle unicode
407
in prompt strings (io:get_line/{1,2}). io_lib is also
408
updated to format prompts with the 't' modifier (i.e. ~ts
411
Own Id: OTP-8418 Aux Id: OTP-8393 </p>
415
The resolver routines failed to look up the own node name
416
as hostname, if the OS native resolver was erroneously
417
configured, bug reported by Yogish Baliga, now fixed.</p>
419
The resolver routines now tries to parse the hostname as
420
an IP string as most OS resolvers do, unless the native
421
resolver is used.</p>
423
The DNS resolver inet_res and file resolver inet_hosts
424
now do not read OS configuration files until they are
425
needed. Since the native resolver is default, in most
426
cases they are never needed.</p>
428
The DNS resolver's automatic updating of OS configuration
429
file data (/etc/resolv.conf) now uses the 'domain'
430
keyword as default search domain if there is no 'search'
433
Own Id: OTP-8426 Aux Id: OTP-8381 </p>
439
<section><title>Improvements and New Features</title>
443
The expected return value for an on_load function has
444
been changed. (See the section about code loading in the
445
Reference manual.)</p>
447
*** POTENTIAL INCOMPATIBILITY ***</p>
453
Explicit top directories in archive files are now
456
For example, if an archive (app-vsn.ez) just contains an
457
app-vsn/ebin/mod.beam file, the file info for the app-vsn
458
and app-vsn/ebin directories are faked using the file
459
info from the archive file as origin. The virtual
460
direcories can also be listed. For short, the top
461
directories are virtual if they does not exist.</p>
467
<c>code:clash/0</c> now looks inside archives (.ez
468
files). (Thanks to Tuncer Ayaz.)</p>
474
There are new <c>gen_sctp:connect_init/*</c> functions
475
that initiate an SCTP connection without blocking for the
476
result. The result is delivered asynchronously as an
477
sctp_assoc_change event. (Thanks to Simon Cornish.)</p>
33
486
<section><title>Kernel 2.13.4</title>
35
488
<section><title>Fixed Bugs and Malfunctions</title>