Age | Commit message (Collapse) | Author |
|
|
|
* lukas/kernel/os_cmd_fix_stdin_close/OTP-13867:
kernel: Close stdin of commands run in os:cmd
|
|
This is needed when running programs that only exit when
stdin has been closed, e.g. 'more'.
|
|
|
|
* maint-19:
Updated OTP version
Prepare release
erts: Make sure to flush potential exit message
|
|
|
|
|
|
|
|
* lukas/erts/fix_init_stop_code_load_race/OTP-13802:
erts/kernel: Fix code loading deadlock during init:stop
|
|
When init:stop is called it walks the application hierarchy
and terminates each process. Some of these processes may do
something while terminating and sometimes that something
needs to load some new code in order to work. When this happens
the code_server could just be in the process of terminating
or the erl_prim_loader could be active. In both these cases
the request to load the new code would cause a deadlock in the
termination of the system.
This commit fixes this by init rejecting attempts to load new code
when init:stop has been called and fixing a termination race in
the code_server.
This however means that the process that tried to do something
when told to terminate (for instance logging that it is terminating)
will crash instead of loading the code.
|
|
|
|
by separating the constant values into tuple ConData.
and that exposed the fact that TcpAddress and MyNode
where not used.
|
|
|
|
Conflicts:
lib/ssl/src/ssl.appup.src
|
|
This is needed as doing only an 'exit' will only exit the
program, but any children started in the program that have
stdout/stderr still open will keep the port open until they
terminate. i.e.
os:cmd("while true; do echo sleep 1; sleep 1; done&").
would block os:cmd forever because the while loop keeps its copies
of stdout/stderr open forever.
It could be argued that this is correct behaviour, and it is
the way it works on windows, but changing this breaks backwards
compatability for os:cmd which is not acceptable.
|
|
* okumin/kernel/remove-duplicated-line/PR-1119/OTP-13771:
Remove a duplicated pattern matching in erl_epmd.erl
|
|
maint
* lemenkov/kernel/fix-register_ipv6_epmd/PR-1129/OTP-13770:
Respect -proto_dist switch while connection to EPMD
|
|
Signed-off-by: Peter Lemenkov <[email protected]>
|
|
|
|
`select_best_version` has the duplicated case.
|
|
* raimo/uds-support/OTP-13643:
Update test cases after daily builds
Return eafnosupport when not supported
Add AF_LOCAL test cases
Handle 'undefined' in fdopen
|
|
|
|
For use in ssl:getstat/{1,2}.
|
|
|
|
|
|
* saleyn/uds/PR-612/OTP-13572:
Rewrite inet* for address family 'local'
Rewrite inet_drv for AF_LOCAL
Assign externally open fd to gen_tcp (UDS support)
Conflicts:
erts/preloaded/ebin/prim_inet.beam
lib/kernel/doc/src/gen_tcp.xml
lib/kernel/doc/src/gen_udp.xml
lib/kernel/src/inet6_sctp.erl
lib/kernel/test/inet_SUITE.erl
|
|
|
|
|
|
|
|
* legoscia/erts/epmd-module-option/OTP-13627:
Add tests for -start_epmd and -epmd_module options
Use the -epmd_module flag consistently
Add -start_epmd command line option
|
|
If the -epmd_module flag has been specified on the command line, use
that module to register and look up node names instead of the default,
erl_epmd.
Also document this option.
|
|
This makes the implementation text of inet:gethostbyname/1 identical to
that of inet_res:gethostbyname/1. I also copied over the doc note about
this resolver option.
|
|
* bjorn/fix-on_load/OTP-12593:
Update documentation regarding improvements
Correctly handle multiple load attempts when on_load is pending
Avoid deadlock when an on_load function makes an external call to the module itself
code_server: Eliminate unnecessary Tag in handle_call/3
Reimplement -on_load()
Refactor erts_finish_loading() and insert_new_code()
code_SUITE: Make on_load_binary/1 clearer by using merl
|
|
If an on_load function had not yet returned, the code server
would only correctly handle calls to code:ensure_loaded/1. That
is, each process that called code:ensured_loaded/1 for the
module in question would be suspended until the on_load function
had returned.
The code server handled calls to code:load_binary/1, code:load_file/1,
and code:load_abs/1 in the same way as for code:ensure_loaded/1.
That means that if call to one those functions attempted to load
*different* code for the module, that code would not get loaded.
Note that code:finish_loading/1 (code:atomic_load/1) will still return
{error,pending_on_load} if there is a pending on_load function for one
of the modules that are about to be loaded. The reason is that
code:finish_loading/1 is meant to either succeed directly, or fail
quickly if there is any problem.
|
|
itself
|
|
For historical reasons, the second argument in handle_call/3 is
{Pid,Tag}. The tag is always 'call' and is never used.
|
|
Load the module as old code; swap old and new code if the
-on_load function succeeds. That way, a failed update attempt
for a module that has an -on_load function will preserve the
previous version of the code.
|
|
* legoscia/dist-shutdown-reasons/PR-1028/OTP-13458:
Error reasons for more distribution errors
|
|
* zandra/optimize-rpc/OTP-13518:
use maps instead of gb_trees to optimize the rpc server
let the spawned processes handle rpc replies
Conflicts:
lib/runtime_tools/test/dbg_SUITE.erl
|
|
|
|
This decreases the load on the rex server.
|
|
|
|
|
|
|
|
Refactor get_name/1 to facilitate an optimization in the next commit.
|
|
make_path() returns a tuple whose second element is not used by
any of its caller. Eliminate the tuple.
Also avoid calling filename:dirname/1 when we already have the result
stored in a variable, and avoid calling filename:basename/2 on a
complete path when we already have the last part of the pathname
stored in a variable.
|
|
absname/1 is quite expensive, so we should not call if we already
have a normalized absolute path.
|
|
The same filtering of sub directories is done in archive_subdirs/1
and try_archive_subdirs/1. Actually, archive_subdirs/1 does nothing
useful. It can be removed and all_archive_subdirs/1 can be renamed
to archive_subdirs/1.
In try_archive_subdirs/1, we can also replace filename:join/1
with the cheaper filename:append/1, since we know that pathnames
have already been normalized.
|
|
It is faster and easier to use filename:split/1 and filename:join/1
than use four different 'filename' operations. Each call in the
original call first flattens the input list, and then traverse the
entire string to the end. So there are roughly 8 complete traversals.
In comparison, filename:split/1 will traverse the input string
twice (once to flatten, once to split) and filename:join/1 once.
For background on why this optimization is worthwhile, here is the
result of profiling the start-up of the run-time system on my computer
(done before this optimization):
$ $ERL_TOP/bin/erl -profile_boot
.
.
.
filename:join1/4 - 13573 : 13805 us
erlang:finish_loading/1 - 27 : 19963 us
filename:do_flatten/2 - 29337 : 49518 us
erlang:prepare_loading/2 - 49 : 52270 us
Note that filename:do_flatten/2 ends up in second place, almost
as expensive as erlang:prepare_loading/2. Your mileage may vary,
depending on the length of $ERL_TOP and the number of extra
directories added to the path using $ERL_LIBS.
|
|
|