aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
AgeCommit message (Collapse)Author
2015-01-23Merge branch 'maint'Marcus Arendt
2015-01-23Merge branch 'nox/standard_error/OTP-12424' into maintMarcus Arendt
* nox/standard_error/OTP-12424: Test standard_error Properly handle broken input in standard_error Fix io:getopts(standard_error)
2015-01-20Properly handle broken input in standard_errorAnthony Ramine
io:put_chars(standard_error, [oops]) could previously crash the standard_error process. Reported-by: Alexei Sholik
2015-01-19Export type gen_udp:socket/0Dmitry Ivanov
2014-12-29Merge branch 'lemenkov/use_os_getenv_2'Marcus Arendt
* lemenkov/use_os_getenv_2: fix missing include Start using os:getenv/2 fun Introduce os:getenv/2
2014-12-15Start using os:getenv/2 funPeter Lemenkov
See #535 Signed-off-by: Peter Lemenkov <[email protected]>
2014-12-15Introduce os:getenv/2Peter Lemenkov
Signed-off-by: Peter Lemenkov <[email protected]>
2014-12-03Merge branch 'maint'Raimo Niskanen
2014-12-03Merge branch 'raimo/netns-opt-gen_udp/OTP-12314' into maintRaimo Niskanen
* raimo/netns-opt-gen_udp/OTP-12314: Text netns option at socket open Fix handling netns option in gen_udp
2014-11-26Introduce os:getenv/2Peter Lemenkov
Signed-off-by: Peter Lemenkov <[email protected]>
2014-11-26Merge branch 'nox/read_file_info-raw/OTP-12325' into maintLukas Larsson
* nox/read_file_info-raw/OTP-12325: kernel: Do not check unsync:ed file size Introduce new option 'raw' in file_info functions
2014-11-26Merge branch 'maint'Lukas Larsson
* maint: kernel: Do not check unsync:ed file size Introduce new option 'raw' in file_info functions
2014-11-26Merge branch 'nox/read_file_info-raw/OTP-12325' into maintLukas Larsson
* nox/read_file_info-raw/OTP-12325: kernel: Do not check unsync:ed file size Introduce new option 'raw' in file_info functions
2014-11-20Fix handling netns option in gen_udpEmil Holmström
Bug found by Yaroslav Maslennikov and Andrei Pampukha.
2014-10-30Merge branch 'nox/rm-raw_files/OTP-12276'Marcus Arendt
* nox/rm-raw_files/OTP-12276: Remove untested option 'raw_files' from file module
2014-10-20Merge branch 'lukas/erts/non-blocking-shell'Lukas Larsson
* lukas/erts/non-blocking-shell: Fix io:columns/0 timeout when invoked via user kernel,ssh: Add synchronous user_drv protocol erts: Make writing to non-tty fds non-blocking erts: Make tty driver non-blocking
2014-10-20Merge branch 'maint'Bruce Yinhe
2014-10-16Fix io:columns/0 timeout when invoked via userJosé Valim
This patch fixes an issue where io:columns/0 times out when invoked from any application callback (or any supervisor/supervised module since the group leader is inherited). To reproduce the issue, one must simply call io:columns() from any application callback. You will notice the process will block for 2 seconds which then times out and returns {:error, :enotsup}. Note this bug only happens inside the erlang shell (using -noshell or escripts do not trigger the bug). To fix the bug, it is important to understand how io requests flow from application callback processes. Here are the steps followed: 1. Since io:columns/1 is timing out, the first step is to find out who is the group leader for the application callback process. Using process_info/1, we can see the parent process is the application_master and handles io_requests by delegating them to the group_leader. 2. By inspecting the application_master process, we can find the group_leader the message is sent is the registered process named user. The process is running the group module which does handle io:columns/1 requests delegating them to user_drv process. 3. The user_drv process does handle tty_geometry requests, except that a clause above ends up short-circuiting all tty_geometry requests from the user process. This patch moves the user clause below the specific driver messages. OTP-12241
2014-10-16kernel,ssh: Add synchronous user_drv protocolLukas Larsson
Added a put_chars_sync to the protocol that can be used to talk to user_drv and made group use it. This is needed in order to guarantee that bytes has been pushed to the tty port when doing something like this: io:format("halting\n"),erlang:halt(0). Before this change the halting message could be lost in the message queue of the user_drv process, this is no longer possible. This commit also fixes ssh_cli as that plugs itself in as a user_drv process. OTP-12240
2014-10-02Fix obsolete commentadelzhang
spawn_request/1 is obsolete since R11B-0
2014-09-25Merge branch 'maint'Marcus Arendt
2014-08-26Install internal hrl files when necessaryPeter Lemenkov
Sometimes we install *.erl files. Some these files include a private *.hrl files, so in order to make these *.erl files usable we have to install these private includes as well. Signed-off-by: Peter Lemenkov <[email protected]>
2014-08-24Fix io:getopts(standard_error)Anthony Ramine
The standard_error process didn't handle the getopts I/O protocol request correctly and didn't store its encoding in the same way as standard_io.
2014-08-21Merge branch 'maint'Marcus Arendt
2014-08-14Refactor erl_epmd:names/1Luca Favatella
Simplify erl_epmd:names/1, keeping the same functionalities, relying on inet:gethostbyname/1 being able to handle both atoms and strings.
2014-08-14Accept inet:ip_address() in net_adm:names/1Luca Favatella
This change also simplifies the code avoiding a double (conditional) call to inet:gethostbyname/1 (in net_adm:names/1 and then erl_epmd:names/1).
2014-07-24Merge branch 'maint'Henrik Nord
Conflicts: erts/preloaded/ebin/prim_inet.beam
2014-07-24Merge branch 'maint-r16' into maintHenrik Nord
Conflicts: erts/doc/src/notes.xml erts/preloaded/ebin/prim_inet.beam erts/vsn.mk lib/kernel/doc/src/notes.xml lib/kernel/vsn.mk
2014-07-22Fix default behaviour for legacy fdopenHenrik Nord
Update testcase for gen_udp:open/2 with option fd
2014-07-22kernel: When doing an fdopen we now also bind the fd to the specified addr/portLukas Larsson
2014-07-11Merge branch 'maint'Erland Schönbeck
2014-07-10Merge branch 'nox/filelib-wildcard-broken-link' into maint-17Erlang/OTP
* nox/filelib-wildcard-broken-link: Update stdlib appup file Update runtime dependencies Update preloaded Add tests of filelib and symlinks Fix handling of broken symlinks in filelib Conflicts: erts/preloaded/ebin/erl_prim_loader.beam
2014-07-09Update runtime dependenciesSiri Hansen
2014-07-09Fix handling of broken symlinks in filelibAnthony Ramine
This fixes a bug introduced in f11aabdc9fec593c31e6c4f3fa25c1707e9c35df where filelib:eval_read_file_info/2 was made to use file:read_link_info/1 to never follow symlinks. This fixed wildcard/1 but broke every other function using eval_read_file_info/2. Reported-by: Louis-Philippe Gauthier Reported-by: Danil Zagoskin
2014-06-30Remove untested option 'raw_files' from file moduleAnthony Ramine
This undocumented option makes an application:get_env/2 call every time a raw file is opened.
2014-06-28Introduce new option 'raw' in file_info functionsAnthony Ramine
This option allows the caller not to go through the file server for information about files guaranteed to be local.
2014-06-17Merge branch 'maint'Björn Gustavsson
* maint: Fix handling of latin1 characters in false ifdef branches add_abstract_code: Remove 'from_asm' option Remove documentation and stub for non-exist file:file_info/1
2014-06-17Merge branch 'bjorn/kernel/remove-file_info-vestiges/OTP-11982' into maintBjörn Gustavsson
* bjorn/kernel/remove-file_info-vestiges/OTP-11982: Remove documentation and stub for non-exist file:file_info/1
2014-06-13Remove documentation and stub for non-exist file:file_info/1Björn Gustavsson
file:file_info/1 was removed a long time ago, but its documentation was not removed.
2014-06-12Merge branch 'maint'Björn Gustavsson
* maint: Allow unsticking pre-loaded modules
2014-06-12Allow unsticking pre-loaded modulesBjörn Gustavsson
Commit ed06dd12ea74018b902a2c4c7924313d23cedb75 made pre-loaded modules (such as erlang) sticky, and also made it impossible to unstick them to prevent them from ever be reloaded. It turns out that there are tools that may want to instrument the erlang module (such as concuerror), so making it impossible to unstick modules is harsh. Therefore, revert the part of the commit that prevented unsticking the pre-loaded modules.
2014-06-06Merge branch 'maint'Rickard Green
2014-06-04Make pre-loaded modules permanently stickyBjörn Gustavsson
Modules in the kernel, stdlib, and compiler applications are by default "sticky", meaning that the code server will refuse to re-load them. The pre-loaded modules (those that are part of the run-time system itself, such as 'erlang') are, however, not sticky. They used to be sticky a long time ago when the pre-loaded modules were part of the kernel application. Now they are part of the erts application. Since re-loading a pre-loaded module can be catastrophic (especially re-loading the 'erlang' module), the pre-loaded modules must be sticky. Furthermore, it should not be allowed to unstick them. The sticky_dir/1 test case in code_SUITE is never actually run and is broken. Rewrite it.
2014-05-26Teach code:del_path/1 to ignore superfluous slashesBjörn Gustavsson
The following sequence will NOT leave the code path unchanged: code:add_path("/some/app/"), . . . code:del_path("/some/app/") The reason is that code:add_path/1 will normalize the path name (removing the trailing slash), while code:del_path/1 does not normalize the path before searching for it in the code path.
2014-05-12Merge branch 'maint'Björn-Egil Dahlberg
2014-05-05Merge branch 'siri/appups-18.0/OTP-11881'Siri Hansen
* siri/appups-18.0/OTP-11881: Update kernel, stdlib and sasl appup files for Erlang/OTP-18
2014-04-30kernel: Fix erts_debug:size/1 to handle Map sizesBjörn-Egil Dahlberg
2014-04-22Update kernel, stdlib and sasl appup files for Erlang/OTP-18Siri Hansen
2014-04-11Store expanded config in application_controller:change_application_dataSiri Hansen
If the Config given to application_controller:change_application_data included other config files, it was only expanded for already existing (loaded) applications. If an upgrade added a new application which had config data in an included config file, the new application did not get correct config data. This is now changed so config data will be expanded for all applications.
2014-03-30Export type application:start_type()Loïc Hoguin
Also use this type in the start/2 callback spec.