aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/user_drv.erl
AgeCommit message (Collapse)Author
2018-06-18Update copyright yearHenrik Nord
2017-08-28Always reply to sync requestsDan Gudmundsson
Otherwise processes doing io could get stuck. See ERL-472.
2016-02-17kernel: Add suppression of Dialyzer warningsHans Bolinder
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-20Fix usage of io-request queueRickard Green
2015-04-22Fix problem with unitialized edlin text bufferPeter Andersson
Also make it possible to copy text buffer from current group process to the JCL mode
2015-04-22Fix shell crash when in switch command modeJonas Falkevik
The user_drv process can crash if ctrl-y is pressed when in switch command mode (ctrl-g). This is due to switch mode using edlin to parse the input. And edlin uses the process dictionary to store the kill_buffer. However the kill_buffer is undefined if not initialized by edlin:init/0 which makes the user_drv process crash since edlin is calling list:reverse/2 with undefined. Fix calles edlin:init/0 once before server_loop is entered.
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
2013-07-24Merge branch 'maint'Björn-Egil Dahlberg
2013-07-21Fix indentation of User switch command help in Erlang shellsyl20bnr
2013-05-06Fix unmatched_returns warnings in STDLIB and KernelHans Bolinder
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-25Make adjustments for UnicodeHans Bolinder
2011-12-09Update copyright yearsBjörn-Egil Dahlberg
2011-08-18make tab completion work in remote shellsMats Cronqvist
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP