aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
Diffstat (limited to 'erts')
-rw-r--r--erts/doc/src/driver_entry.xml14
-rw-r--r--erts/doc/src/erl.xml3
-rw-r--r--erts/emulator/beam/erl_drv_thread.c3
-rw-r--r--erts/emulator/sys/unix/sys.c10
-rw-r--r--erts/preloaded/ebin/erl_prim_loader.beambin50384 -> 50384 bytes
-rw-r--r--erts/preloaded/ebin/erlang.beambin24320 -> 24144 bytes
-rw-r--r--erts/preloaded/ebin/init.beambin44876 -> 44876 bytes
-rw-r--r--erts/preloaded/ebin/otp_ring0.beambin1432 -> 1432 bytes
-rw-r--r--erts/preloaded/ebin/prim_file.beambin31552 -> 31548 bytes
-rw-r--r--erts/preloaded/ebin/prim_inet.beambin65060 -> 64888 bytes
-rw-r--r--erts/preloaded/ebin/prim_zip.beambin22432 -> 22432 bytes
-rw-r--r--erts/preloaded/ebin/zlib.beambin10616 -> 10616 bytes
-rw-r--r--erts/preloaded/src/erlang.erl16
-rw-r--r--erts/preloaded/src/prim_inet.erl4
14 files changed, 24 insertions, 26 deletions
diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml
index 7d1585f483..dfddbb18ea 100644
--- a/erts/doc/src/driver_entry.xml
+++ b/erts/doc/src/driver_entry.xml
@@ -36,7 +36,7 @@
<description>
<p>As of erts version 5.5.3 the driver interface has been extended
(see <seealso marker="driver_entry#extended_marker">extended marker</seealso>).
- The extended interface introduce
+ The extended interface introduces
<seealso marker="erl_driver#version_management">version management</seealso>,
the possibility to pass capability flags
(see <seealso marker="driver_entry#driver_flags">driver flags</seealso>)
@@ -45,21 +45,21 @@
<note>
<p>Old drivers (compiled with an <c>erl_driver.h</c> from an
earlier erts version than 5.5.3) have to be recompiled
- (but does not have to use the extended interface).</p>
+ (but do not have to use the extended interface).</p>
</note>
<p>The <c>driver_entry</c> structure is a C struct that all erlang
- drivers defines. It contains entry points for the erlang driver
+ drivers define. It contains entry points for the erlang driver
that are called by the erlang emulator when erlang code accesses
the driver.</p>
<p>
<marker id="emulator"></marker>
The <seealso marker="driver_entry">erl_driver</seealso> driver
- API functions needs a port handle
+ API functions need a port handle
that identifies the driver instance (and the port in the
emulator). This is only passed to the <c>start</c> function, but
not to the other functions. The <c>start</c> function returns a
driver-defined handle that is passed to the other functions. A
- common practice is to have the <c>start</c> function allocating
+ common practice is to have the <c>start</c> function allocate
some application-defined structure and stash the <c>port</c>
handle in it, to use it later with the driver API functions.</p>
<p>The driver call-back functions are called synchronously from the
@@ -239,7 +239,7 @@ typedef struct erl_drv_entry {
</item>
<tag>void *handle</tag>
<item>
- <p>This field is reserved for the emulators internal use. The
+ <p>This field is reserved for the emulator's internal use. The
emulator will modify this field; therefore, it is important
that the <c>driver_entry</c> isn't declared <c>const</c>.</p>
</item>
@@ -403,7 +403,7 @@ typedef struct erl_drv_entry {
<tag>void *handle2</tag>
<item>
<p>
- This field is reserved for the emulators internal use. The
+ This field is reserved for the emulator's internal use. The
emulator will modify this field; therefore, it is important
that the <c>driver_entry</c> isn't declared <c>const</c>.
</p>
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index 77bd952d41..1e6e290f6b 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -231,7 +231,8 @@
<tag><c><![CDATA[-detached]]></c></tag>
<item>
<p>Starts the Erlang runtime system detached from the system
- console. Useful for running daemons and backgrounds processes.</p>
+ console. Useful for running daemons and backgrounds processes. Implies
+ <c><![CDATA[-noinput]]></c>.</p>
</item>
<tag><c><![CDATA[-emu_args]]></c></tag>
<item>
diff --git a/erts/emulator/beam/erl_drv_thread.c b/erts/emulator/beam/erl_drv_thread.c
index 08a35387f2..39bbe9633b 100644
--- a/erts/emulator/beam/erl_drv_thread.c
+++ b/erts/emulator/beam/erl_drv_thread.c
@@ -698,6 +698,7 @@ erl_drv_thread_join(ErlDrvTid tid, void **respp)
#if defined(__DARWIN__) && defined(USE_THREADS) && defined(ERTS_SMP)
extern int erts_darwin_main_thread_pipe[2];
+extern int erts_darwin_main_thread_result_pipe[2];
int
@@ -709,7 +710,7 @@ erl_drv_stolen_main_thread_join(ErlDrvTid tid, void **respp)
x = &dummy;
else
x = respp;
- read(erts_darwin_main_thread_pipe[0],x,sizeof(void *));
+ read(erts_darwin_main_thread_result_pipe[0],x,sizeof(void *));
return 0;
}
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index 5f38d73359..bafbbb0f6c 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -2997,10 +2997,12 @@ init_smp_sig_notify(void)
#ifdef __DARWIN__
int erts_darwin_main_thread_pipe[2];
+int erts_darwin_main_thread_result_pipe[2];
-static void initialize_darwin_main_thread_pipe(void)
+static void initialize_darwin_main_thread_pipes(void)
{
- if (pipe(erts_darwin_main_thread_pipe) < 0) {
+ if (pipe(erts_darwin_main_thread_pipe) < 0 ||
+ pipe(erts_darwin_main_thread_result_pipe) < 0) {
erl_exit(1,"Fatal error initializing Darwin main thread stealing");
}
}
@@ -3011,7 +3013,7 @@ erts_sys_main_thread(void)
{
erts_thread_disable_fpe();
#ifdef __DARWIN__
- initialize_darwin_main_thread_pipe();
+ initialize_darwin_main_thread_pipes();
#endif
/* Become signal receiver thread... */
#ifdef ERTS_ENABLE_LOCK_CHECK
@@ -3039,7 +3041,7 @@ erts_sys_main_thread(void)
read(erts_darwin_main_thread_pipe[0],&func,sizeof(void* (*)(void*)));
read(erts_darwin_main_thread_pipe[0],&arg, sizeof(void*));
resp = (*func)(arg);
- write(erts_darwin_main_thread_pipe[1],&resp,sizeof(void *));
+ write(erts_darwin_main_thread_result_pipe[1],&resp,sizeof(void *));
}
#else
#ifdef DEBUG
diff --git a/erts/preloaded/ebin/erl_prim_loader.beam b/erts/preloaded/ebin/erl_prim_loader.beam
index 87ff5119fd..bff3f7f9de 100644
--- a/erts/preloaded/ebin/erl_prim_loader.beam
+++ b/erts/preloaded/ebin/erl_prim_loader.beam
Binary files differ
diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam
index 6b0d96ff8e..5d2f187435 100644
--- a/erts/preloaded/ebin/erlang.beam
+++ b/erts/preloaded/ebin/erlang.beam
Binary files differ
diff --git a/erts/preloaded/ebin/init.beam b/erts/preloaded/ebin/init.beam
index 8a7a9a1314..7e492057da 100644
--- a/erts/preloaded/ebin/init.beam
+++ b/erts/preloaded/ebin/init.beam
Binary files differ
diff --git a/erts/preloaded/ebin/otp_ring0.beam b/erts/preloaded/ebin/otp_ring0.beam
index 5d544ff4aa..c443866671 100644
--- a/erts/preloaded/ebin/otp_ring0.beam
+++ b/erts/preloaded/ebin/otp_ring0.beam
Binary files differ
diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam
index 3ed02ecd44..4a75e43e73 100644
--- a/erts/preloaded/ebin/prim_file.beam
+++ b/erts/preloaded/ebin/prim_file.beam
Binary files differ
diff --git a/erts/preloaded/ebin/prim_inet.beam b/erts/preloaded/ebin/prim_inet.beam
index 79a8d22366..30bbfb0943 100644
--- a/erts/preloaded/ebin/prim_inet.beam
+++ b/erts/preloaded/ebin/prim_inet.beam
Binary files differ
diff --git a/erts/preloaded/ebin/prim_zip.beam b/erts/preloaded/ebin/prim_zip.beam
index 3cc8c6b8be..6681466767 100644
--- a/erts/preloaded/ebin/prim_zip.beam
+++ b/erts/preloaded/ebin/prim_zip.beam
Binary files differ
diff --git a/erts/preloaded/ebin/zlib.beam b/erts/preloaded/ebin/zlib.beam
index 3f9e867542..593bb8dbed 100644
--- a/erts/preloaded/ebin/zlib.beam
+++ b/erts/preloaded/ebin/zlib.beam
Binary files differ
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index 935c2de253..d6dc070436 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -427,17 +427,11 @@ delay_trap(Result, Timeout) -> receive after Timeout -> Result end.
%% have to reflect that, which we cannot forsee.
%%
set_cookie(Node, C) when Node =/= nonode@nohost, is_atom(Node) ->
- Res = case C of
- _ when is_atom(C) ->
- auth:set_cookie(Node, C);
- {CI,CO} when is_atom(CI), is_atom(CO) ->
- auth:set_cookie(Node, {CI, CO});
- _ ->
- error
- end,
- case Res of
- error -> exit(badarg);
- Other -> Other
+ case is_atom(C) of
+ true ->
+ auth:set_cookie(Node, C);
+ false ->
+ error(badarg)
end.
-spec get_cookie() -> atom().
diff --git a/erts/preloaded/src/prim_inet.erl b/erts/preloaded/src/prim_inet.erl
index 446656e45f..2e4a2866e6 100644
--- a/erts/preloaded/src/prim_inet.erl
+++ b/erts/preloaded/src/prim_inet.erl
@@ -1518,7 +1518,7 @@ enc_value_2(addr, {IP,Port}) when tuple_size(IP) =:= 4 ->
[?INET_AF_INET,?int16(Port)|ip4_to_bytes(IP)];
enc_value_2(addr, {IP,Port}) when tuple_size(IP) =:= 8 ->
[?INET_AF_INET6,?int16(Port)|ip6_to_bytes(IP)];
-enc_value_2(ether, [X1,X2,X3,X4,X5,X6]) -> [X1,X2,X3,X4,X5,X6];
+enc_value_2(ether, [_,_,_,_,_,_]=Xs) -> Xs;
enc_value_2(sockaddr, any) ->
[?INET_AF_ANY];
enc_value_2(sockaddr, loopback) ->
@@ -1572,7 +1572,7 @@ dec_value(time, [X3,X2,X1,X0|T]) ->
Val -> {Val, T}
end;
dec_value(ip, [A,B,C,D|T]) -> {{A,B,C,D}, T};
-dec_value(ether,[X1,X2,X3,X4,X5,X6|T]) -> {[X1,X2,X3,X4,X5,X6],T};
+%% dec_value(ether, [X1,X2,X3,X4,X5,X6|T]) -> {[X1,X2,X3,X4,X5,X6],T};
dec_value(sockaddr, [X|T]) ->
get_ip(X, T);
dec_value(linkaddr, [X1,X0|T]) ->