aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
AgeCommit message (Collapse)Author
2017-03-10Update copyright yearRickard Green
2017-03-08Update appups in kernel and stdlib for OTP-19.3Siri Hansen
2017-02-21kernel: Fix hanging os:cmd race conditionLukas Larsson
If the port terminates before Port ! close is issued, there will be no 'closed' reply, so the old code would hang. As it turns out there is no way to figure out if a closed reply is supposed to come as that reply is sent after all links and monitors are triggered. So we have to use the synchronous port_close to close the port.
2017-02-06Merge pull request #1328 from bjorng/bjorn/kernel/off-heap-message/OTP-14142Björn Gustavsson
Store messages for 'rex' and 'error_logger' off heap OTP-14192
2017-02-06Merge pull request #1283 from pulitta/maintBjörn Gustavsson
file: match enoent and enotdir in path_open OTP-14191
2017-02-03Store messages for 'rex' and 'error_logger' off heapBjörn Gustavsson
Performance for processes that receive huge amounts of messages can be increased by storing the incoming messages outside the heap (that avoids copying the message in a garbage collection). Two OTP processes that are known to receive many messages are 'rex' (used by 'rpc') and 'error_logger'.
2017-02-01file: match enoent and enotdir in path_openpulitta
2016-12-19Merge branch 'legoscia/remove-watchdog-vestiges/PR-1255/OTP-14112' into maintBjörn-Egil Dahlberg
* legoscia/remove-watchdog-vestiges/PR-1255/OTP-14112: Remove vestiges of watchdog support in heart
2016-12-07Update copyright-yearErlang/OTP
2016-11-21Remove vestiges of watchdog support in heartMagnus Henoch
Hardware watchdog support was removed from heart in R13A, but there were still some vestiges in the code and the documentation. - Remove mentions of the HW_WD_DISABLE variable, as it's no longer used. - Remove the HEART_BEAT_BOOT_DELAY variable, as it was only used for the hardware watchdog.
2016-11-09Merge branch ↵Raimo Niskanen
'gomoripeti/kernel/controlling_proc_badarg_doc/PR-1208/OTP-14022' into maint * gomoripeti/kernel/controlling_proc_badarg_doc/PR-1208/OTP-14022: controlling_process can return {error, badarg}
2016-11-03Merge branch 'sverker/kernel-erts-dependency/OTP-14003' into maintSverker Eriksson
* sverker/kernel-erts-dependency: kernel: Add lost dependency to erts-8.1
2016-10-31kernel: Add lost dependency to erts-8.1Sverker Eriksson
In OTP-19.1 (c70ca686fe269db6079a2ca1c7e09cdfc0cfa903) erts_code_purger:finish_after_on_load/2 was added and called by code_server.erl.
2016-10-27controlling_process can return {error, badarg}Péter Gömöri
For gen_tcp, gen_udp and gen_sctp controlling_process/2 can return badarg if erlang:port_connect/2 fails with badarg. This can easily happen if the new owner is not alive but in some race condition also when the socket is closed right before port_connect/2 (and after the previous socket function) This commit documents this behaviour.
2016-09-26Update appups in kernel and stdlib for OTP versions > 19.1Siri Hansen
2016-09-15Merge branch 'raimo/diffserv-socket-option/OTP-13582' into maintRaimo Niskanen
* raimo/diffserv-socket-option/OTP-13582: Tune 'tclass' semantics Implement IPV6_TCLASS
2016-09-15Merge branch 'bjorn/erts/on_load/ERL-240/OTP-13893' into maintBjörn Gustavsson
* bjorn/erts/on_load/ERL-240/OTP-13893: erts: Add nif_SUITE:t_on_load erts: Improve nif_SUITE:upgrade test Don't leak old code when loading a modules with an on_load function
2016-09-14Don't leak old code when loading a modules with an on_load functionBjörn Gustavsson
Normally, calling code:delete/1 before re-loading the code for a module is unnecessary but causes no problem. But there will be be problems if the new code has an on_load function. Code with an on_load function will always be loaded as old code to allowed it to be easily purged if the on_load function would fail. If the on_load function succeeds, the old and current code will be swapped. So in the scenario where code:delete/1 has been called explicitly, there is old code but no current code. Loading code with an on_load function will cause the reference to the old code to be overwritten. That will at best cause a memory leak, and at worst an emulator crash (especially if NIFs are involved). To avoid that situation, we will put the code with the on_load function in a special, third slot in Module. ERL-240
2016-09-12Implement IPV6_TCLASSRaimo Niskanen
2016-09-08Fix incorrect priv_dir when adding app's ebin directory to pathPeter Andersson
2016-09-05Merge branch 'lukas/kernel/os_cmd_fix_stdin_close/OTP-13867' into maintLukas Larsson
* lukas/kernel/os_cmd_fix_stdin_close/OTP-13867: kernel: Close stdin of commands run in os:cmd
2016-09-02kernel: Close stdin of commands run in os:cmdLukas Larsson
This is needed when running programs that only exit when stdin has been closed, e.g. 'more'.
2016-08-19Merge branch 'sverker/net_kernel-setopts/OTP-13564' into maintSverker Eriksson
2016-08-17Merge branch 'maint-19' into maintLukas Larsson
* maint-19: Updated OTP version Prepare release erts: Make sure to flush potential exit message
2016-08-16erts: Make sure to flush potential exit messageLukas Larsson
2016-08-15kernel: Accept and convert old hs_data recordSverker Eriksson
2016-08-15kernel: Add net_kernel:setopts/2 and getopts/2Sverker Eriksson
2016-08-12Merge branch 'lukas/erts/fix_init_stop_code_load_race/OTP-13802' into maintLukas Larsson
* lukas/erts/fix_init_stop_code_load_race/OTP-13802: erts/kernel: Fix code loading deadlock during init:stop
2016-08-12erts/kernel: Fix code loading deadlock during init:stopLukas Larsson
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.
2016-08-11kernel: Export inet types socket_getopt and socket_setoptSverker Eriksson
2016-08-11kernel: Refactor dist_util:con_loopSverker Eriksson
by separating the constant values into tuple ConData. and that exposed the fact that TcpAddress and MyNode where not used.
2016-08-11kernel: Cleanup code with fancy record syntaxSverker Eriksson
2016-08-09Merge branch 'maint-19' into maintLukas Larsson
Conflicts: lib/ssl/src/ssl.appup.src
2016-08-08kernel: Use ^D as eot for os:cmd on unix platformsLukas Larsson
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.
2016-07-26Merge branch 'okumin/kernel/remove-duplicated-line/PR-1119/OTP-13771' into maintBjörn-Egil Dahlberg
* okumin/kernel/remove-duplicated-line/PR-1119/OTP-13771: Remove a duplicated pattern matching in erl_epmd.erl
2016-07-26Merge branch 'lemenkov/kernel/fix-register_ipv6_epmd/PR-1129/OTP-13770' into ↵Björn-Egil Dahlberg
maint * lemenkov/kernel/fix-register_ipv6_epmd/PR-1129/OTP-13770: Respect -proto_dist switch while connection to EPMD
2016-07-17Respect -proto_dist switch while connection to EPMDPeter Lemenkov
Signed-off-by: Peter Lemenkov <[email protected]>
2016-07-14Fix code_server crash when adding some code paths ERL-194Ignacio Martínez
2016-07-02Remove a duplicated pattern matching in erl_epmd.erlokumin
`select_best_version` has the duplicated case.
2016-06-17Merge branch 'raimo/uds-support/OTP-13643'Raimo Niskanen
* 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
2016-06-15Handle 'undefined' in fdopenRaimo Niskanen
2016-06-09Export type inet:stat_option/0Loïc Hoguin
For use in ssl:getstat/{1,2}.
2016-06-09Document the local (unix) address familyRaimo Niskanen
2016-06-08Remove internal state BOUND from inet_drvRaimo Niskanen
2016-06-02Merge branch 'saleyn/uds/PR-612/OTP-13572'Raimo Niskanen
* 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
2016-06-01Rewrite inet* for address family 'local'Raimo Niskanen
2016-06-01Rewrite inet_drv for AF_LOCALRaimo Niskanen
2016-05-27Bumped runtime dependencies between erts, kernel, stdlib, saslRickard Green
2016-05-27Merge branch 'legoscia/erts/epmd-module-option/OTP-13627'Lukas Larsson
* 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
2016-05-25Use the -epmd_module flag consistentlyMagnus Henoch
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.