aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers
AgeCommit message (Collapse)Author
2017-08-23Merge branch 'maint'Dan Gudmundsson
* maint: Fix ANSI support in the console
2017-08-21Fix ANSI support in the consoleGlauber Campinho
The ANSI support doesn't work properly with edlin, the issue can be noticed when you try to use the history of the shell and the prompt prefix has ANSI (https://github.com/elixir-lang/elixir/issues/6448). The problem is that when a `\e` character appears, it handles it like a new line, dropping the buffer before it. The solution is to always add the `\e` to the buffer like a regular character and handle it when writing the buffer instead.
2017-08-17Merge branch 'maint'Dan Gudmundsson
* maint: stdlib: Improve edlin handling of unicode chars
2017-08-17Merge branch 'dgud/stdlib/edit-unicode' into maintDan Gudmundsson
* dgud/stdlib/edit-unicode: stdlib: Improve edlin handling of unicode chars OTP-14542
2017-08-16stdlib: Improve edlin handling of unicode charsDan Gudmundsson
Let edlin handle grapheme clusters instead of codepoints to improve the handling multi-codepoints characters. The ttsl driver (and protocol) still expects all lengths as codepoints. Previously it was expected that each codepoint used (at least) one terminal column for each codepoint, and a hack was made for wide characters (multicolumn) by patching in TAGGED characters to occupy the extra space so that codepoint index was equal column index. This didn't work at all for combining codepoints that do not occupy any more space than the previous character. Improved this handling by calculating column positions in move_cursor. This is based on wcwidth() and is not perfect, wcwidth() is wrong for some codepoints and wcwidth() can not know with Hangul graphemes for example. But it works better than before without making a major change in the protocol.
2017-07-27Merge branch 'maint'John Högberg
* maint: Updated OTP version Update release notes Update version numbers Fix doc for the 'quiet' option; it defaults to false asn1: Fix missing quotes of external encoding call Add a dedicated close function for TCP ports to prevent issues like ERL-430/448 Close TCP ports properly on send timeout erts: Add missing release note
2017-07-27Merge branch 'maint-20' into maintJohn Högberg
* maint-20: Updated OTP version Update release notes Update version numbers Fix doc for the 'quiet' option; it defaults to false asn1: Fix missing quotes of external encoding call Add a dedicated close function for TCP ports to prevent issues like ERL-430/448 Close TCP ports properly on send timeout erts: Add missing release note
2017-07-26Merge branch 'john/erts/fix-tcp-send-timeout/OTP-14509/ERL-448' into maint-20Erlang/OTP
* john/erts/fix-tcp-send-timeout/OTP-14509/ERL-448: Add a dedicated close function for TCP ports to prevent issues like ERL-430/448 Close TCP ports properly on send timeout
2017-07-17erts: Remove ERTS_SMP and USE_THREAD definesLukas Larsson
This refactor was done using the unifdef tool like this: for file in $(find erts/ -name *.[ch]); do unifdef -t -f defile -o $file $file; done where defile contained: #define ERTS_SMP 1 #define USE_THREADS 1 #define DDLL_SMP 1 #define ERTS_HAVE_SMP_EMU 1 #define SMP 1 #define ERL_BITS_REENTRANT 1 #define ERTS_USE_ASYNC_READY_Q 1 #define FDBLOCK 1 #undef ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT #define ERTS_POLL_ASYNC_INTERRUPT_SUPPORT 0 #define ERTS_POLL_USE_WAKEUP_PIPE 1 #define ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE 1 #undef ERTS_HAVE_PLAIN_EMU #undef ERTS_SIGNAL_STATE
2017-07-10Add a dedicated close function for TCP ports to prevent issues like ERL-430/448John Högberg
2017-07-10Close TCP ports properly on send timeoutJohn Högberg
2017-07-06Merge branch 'john/erts/runtime-lcnt' into maintJohn Högberg
* john/erts/runtime-lcnt: Document rt_mask and add warnings about copy_save Add an emulator test suite for lock counting Break erts_debug:lock_counters/1 into separate BIFs Allow toggling lock counting at runtime Move lock flags to a common header Enable register_SUITE for lcnt builds Enable lcnt smoke test on all builds that have lcnt enabled Make lock counter info independent of the locks being counted OTP-14412 OTP-13170 OTP-14413
2017-07-06Allow toggling lock counting at runtimeJohn Högberg
The implementation is still hidden behind ERTS_ENABLE_LOCK_COUNT, and all categories are still enabled by default, but the actual counting can be toggled at will. OTP-13170
2017-06-30Merge branch 'john/erts/fix-port-leak/OTP-13939/ERL-193' into maint-20Erlang/OTP
* john/erts/fix-port-leak/OTP-13939/ERL-193: Add a testcase for OTP-13939/ERL-193 Mark socket disconnected on tcp_send_or_shutdown_error # Conflicts: # lib/kernel/test/gen_tcp_misc_SUITE.erl
2017-06-27Merge branch 'maint-19' into maintJohn Högberg
* maint-19: Updated OTP version Update release notes Update version numbers Fix statistics(wall_clock) and statistics(runtime) implementation fixup! erts: Cleanup dropped port tasks correctly erts: Add tests to detect port close race Add a testcase for OTP-13939/ERL-193 erts: Cleanup dropped port tasks correctly Mark socket disconnected on tcp_send_or_shutdown_error
2017-06-26Merge branch 'john/erts/fix-port-leak/OTP-13939/ERL-193' into maint-19Erlang/OTP
* john/erts/fix-port-leak/OTP-13939/ERL-193: Add a testcase for OTP-13939/ERL-193 Mark socket disconnected on tcp_send_or_shutdown_error # Conflicts: # lib/kernel/test/gen_tcp_misc_SUITE.erl
2017-06-14Mark socket disconnected on tcp_send_or_shutdown_errorkvakvs
The socket left lingering due to {exit_on_close, false} will accept writes in a confusing way, returning either enotconn or blocking. This fix allows socket to know that it has been closed recently, and new writes won't pass.
2017-06-08Merge branch 'maint'Rickard Green
* maint: Updated OTP version Update release notes Update version numbers erts: Fix so that 81b628 (sigterm=kill) works Updated OTP version Prepare release Unconditionally clear IO buffers on send/shutdown errors Conflicts: OTP_VERSION erts/emulator/sys/unix/sys.c erts/vsn.mk
2017-06-07Merge branch 'john/erts/fix-zombie-tcp-ports/ERL-430/OTP-14441' into maint-19Erlang/OTP
* john/erts/fix-zombie-tcp-ports/ERL-430/OTP-14441: Unconditionally clear IO buffers on send/shutdown errors
2017-06-07Merge branch 'lukas/erts/sendfile_sunos_fix/OTP-14424'Lukas Larsson
* lukas/erts/sendfile_sunos_fix/OTP-14424: erts: Fix sendfile closeduring scenario on sunos
2017-06-07erts: Fix sendfile closeduring scenario on sunosLukas Larsson
On Solaris, giving a too long sfv_len results in an EINVAL error, but data is still transmitted and len is correctly. So we translate this to a success with that amount of data sent. This may hide some other errors that causes EINVAL, but it is the best we can do for now.
2017-06-01Unconditionally clear IO buffers on send/shutdown errorsJohn Högberg
This fixes a bug where a send/shutdown error on an active-mode socket results in the port never being properly closed.
2017-05-19Do not zero terminate Linux abstract addressesRaimo Niskanen
2017-05-04Update copyright yearRaimo Niskanen
2017-04-20implement SO_BINDTODEVICE for inet protocolsAndreas Schultz
bind to device is needed to properly support VRF-Lite under Linux (see [1] for details). [1]: https://www.kernel.org/doc/Documentation/networking/vrf.txt
2017-04-04Merge branch 'maint'Ingela Anderton Andin
Conflicts: OTP_VERSION erts/vsn.mk lib/crypto/c_src/crypto.c lib/crypto/src/crypto.erl lib/ssh/src/ssh.erl
2017-03-30Merge branch 'goeldeepak/erts/fix_inet_gethost_long/ERL-61/PR-1345/OTP-14310'Lukas Larsson
* goeldeepak/erts/fix_inet_gethost_long/ERL-61/PR-1345/OTP-14310: This patch fixes the issue in which erlang fails to start if the hostname is 64 characters on a linux system.
2017-03-29Close FD after trying to open a directoryRaimo Niskanen
2017-03-22This patch fixes the issue in which erlang fails to startDeepak Goel
if the hostname is 64 characters on a linux system.
2017-02-14Fixed typos in ertsAndrew Dryga
2017-02-08Merge branch 'maint'Raimo Niskanen
Conflicts: OTP_VERSION
2017-02-07Use fstat if it exists in efile_openfileRaimo Niskanen
2017-01-17erts: Fix zlib crash on mac for inflateGetDictionarySverker Eriksson
Work around broken build system by checking actual zlib version in runtime.
2016-12-19erts: Tidy up in efile_drv.cSverker Eriksson
ERL_DRV_USE_NO_CALLBACK only meaningful when deselecting.
2016-09-15Merge branch 'maint'Raimo Niskanen
2016-09-14Tune 'tclass' semanticsRaimo Niskanen
2016-09-12Implement IPV6_TCLASSRaimo Niskanen
2016-08-26Merge branch 'g-andrade/kernel/fetch_ztream_dictionary/PR-1139/OTP-13842'Lukas Larsson
* g-andrade/kernel/fetch_ztream_dictionary/PR-1139/OTP-13842: Update preloaded modules Specify min zlib ver on inflateGetDictionary doc Skip inflateGetDictionary test case if unsupported zlib: Only link inflateGetDictionary if available zlib: Add test case for inflateGetDictionary zlib: support extraction of inflation dictionary
2016-08-22zlib: Only link inflateGetDictionary if availableGuilherme Andrade
Which at the moment means zlib versions >= 1.2.8.
2016-07-28Fix SCTP send stats in inet_drvRaimo Niskanen
2016-07-23zlib: support extraction of inflation dictionaryGuilherme Andrade
2016-06-16Return eafnosupport when not supportedRaimo 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: AF_UNIX is more portable
2016-06-02AF_UNIX is more portableRaimo Niskanen
Fix dialyzer warning for improper list in prim_inet by not using an improper list.
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_drv for AF_LOCALRaimo Niskanen
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-04-07Merge branch 'bjorn/erts/huge-file-fix/OTP-13461'Björn Gustavsson
* bjorn/erts/huge-file-fix/OTP-13461: Handle multi-giga byte writes to files
2016-04-04Handle multi-giga byte writes to filesBjörn Gustavsson
Test cases that write 4Gb to a file at once would fail on OS X and FreeBSD. By running a simple test program on OS X (El Capitan 10.11.4/Darwin 15.4.0), I found that writev() can handle more than 4Gb of data, while write() only can handle less than 2Gb. (Note that efile_drv.c will use write() if there is only one element in the io vector, and writev() if there is more than one.) It is tempting to attempt to piggy-back on the existing mechanism for segmenting write operations in efile_drv.c, but because of the complex code I find it too dangerous, both from a correctness and performance perspective. Instead do the change in unix_efile.c, which is considerably simpler.