aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers
AgeCommit message (Collapse)Author
2012-08-16Add checks for in6addr_any and in6addr_loopbackTomas Abrahamsson
These variables are normally declared by <netinet/in.h>, but for instance not on Windows 7, SDK 7.1. Work around that by using IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT if present, fallback to using :: and ::1.
2012-08-16Fix SCTP multihomingTomas Abrahamsson
Setting several ip addresses for an SCTP socket worked only for IPv4 on Linux. For IPv6 and for other for instance Solaris and FreeBSD, it failed with badarg for both IPv4 and IPv6. For the first address specified to gen_sctp:open, bind is now called, while for any following addresses, sctp_bindx is called, repeatedly, with one address at a time. Previously, sctp_bindx was called for all addresses in one go, with the addresses in reverse order, and bind was not called at all if more than one address was specified. Both Solaris and FreeBSD requires bind to have been called before calling sctp_bindx, and FreeBSD additionally allows at most one address at a time in the call to sctp_bindx. For some versions of Linux, for instance SuSE 10, the port can be 0 only for the call to bind but not for subsequent calls to sctp_bindx, so replace with the port number assigned by the operating system.
2012-08-14Teach caret to appear correctly after focus lossPatrik Nyblom
Incorrect window was used to calculate x position.
2012-07-19erts: Remove VxWorks from driversBjörn-Egil Dahlberg
2012-07-18Merge branch 'maint'Henrik Nord
Conflicts: erts/preloaded/ebin/erl_prim_loader.beam lib/kernel/src/code.erl
2012-05-31inet_drv.c: Set sockaddr lengths in inet_set_[f]addressTomas Abrahamsson
Set appropriate values for the sockaddr length fields---sai.sin_len and sai6.sin6_len---if those fields exist; rely on the NO_SA_LEN configure check to see if they exist. The length field exists on at least FreeBSD, and there it needs to have a proper value for instance in the call to sctp_bindx, or else that will fail with EINVAL.
2012-05-09Correct formating in exit error messagesMichael Santos
Ensure displayed sizes are not negative.
2012-05-04Merge branch 'maint'Patrik Nyblom
2012-05-04gen_tcp: Make setopts(S,[{active,once}]) try a readPatrik Nyblom
This significantly reduces latency for tcp servers with high load, as we need not go into poll to get the next message. Maximum throughput may increase between 4 to 6 times compared to R15B.
2012-04-16kernel, erts: Remove bit8 option from inetBjörn-Egil Dahlberg
2012-03-30Merge branch 'maint'Björn-Egil Dahlberg
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-22Merge branch 'maint'Patrik Nyblom
Conflicts: erts/emulator/beam/beam_emu.c erts/emulator/beam/bif.tab erts/preloaded/ebin/prim_file.beam lib/hipe/cerl/erl_bif_types.erl
2012-03-22Correct some errors in the user tag spreadingPatrik Nyblom
2012-03-22Change to more specific configure options for dtracePatrik Nyblom
2012-03-22Add user tag spreading functionality to VM and use in filePatrik Nyblom
User tags in a dynamic trace enabled VM are spread throughout the system in the same way as seq_trace tokens. This is used by the file module and various other modules to get hold of the tag from the user process without changing the protocol.
2012-03-22Update dtrace for changes in R15Björn-Egil Dahlberg
2012-03-22Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 4/4Scott Lystig Fritchie
Add probes to (mostly) the efile_drv.c driver and other file I/O-related source files.
2012-03-20Merge branch 'maint'Sverker Eriksson
Conflicts: erts/preloaded/ebin/zlib.beam Rebuilt zlib.beam as part of this merge commit
2012-03-20Merge branch 'sverk/zlib_port_leak' into maintSverker Eriksson
* sverk/zlib_port_leak: Fix port leaks in zlib OTP-9981
2012-03-20Merge branch 'maint'Gustav Simonsson
2012-03-20Merge branch 'ps/inet6-less-build-fix' into maintGustav Simonsson
* ps/inet6-less-build-fix: Add missing HAVE_IN6 && AF_INET6 ifdef OTP-9996
2012-03-20Merge branch 'maint'Lukas Larsson
* maint: Fix reselecting bug on OS X Fix bug when sending long files using select Fix ifdef to check if we are on OS X Add test case for sending multiple small files on same connection Fix memory leak when sendfile process crashes Extend timeout for windows Skip sendfile suite if solaris 8
2012-03-20Merge branch 'lukas/kernel/sendfile_fixes' into maintLukas Larsson
* lukas/kernel/sendfile_fixes: Fix reselecting bug on OS X Fix bug when sending long files using select Fix ifdef to check if we are on OS X Add test case for sending multiple small files on same connection Fix memory leak when sendfile process crashes Extend timeout for windows Skip sendfile suite if solaris 8
2012-03-20Fix reselecting bug on OS XLukas Larsson
Since stop_select is called at an arbitrary point in the future it would sometime not be alled before the tcp driver started selecting on the fd. So now ERL_DRV_USE_NO_CALLBACK is used so that the stop_select call is never made. This seems to only have happened OS X.
2012-03-20Fix bug when sending long files using selectLukas Larsson
The return value from efile_sendfile was not consistent inbetween platforms. The API should now be working as it was intended. OTP-9994
2012-03-20Fix ifdef to check if we are on OS XLukas Larsson
2012-03-20Fix memory leak when sendfile process crashesLukas Larsson
We use the fact that file_flush is called when there is data in the driver queue when a port is closed to ensure that all data is cleaned up as it should. OTP-9993
2012-03-19Merge branch 'maint'Björn-Egil Dahlberg
Conflicts: erts/preloaded/ebin/prim_inet.beam
2012-03-19Merge branch 'ph/fix-enfile/OTP-9990' into maintBjörn-Egil Dahlberg
* ph/fix-enfile/OTP-9990: Update preloaded prim_inet.beam gen_tcp: Use correct specs for accept and listen prim_inet: Catch system_limit in open_port Fix returned error from gen_tcp:accept/1,2 when running out of ports
2012-03-15Fix port leaks in zlibSverker Eriksson
zip,unzip,gzip,gunzip,compress and uncompress did not close the port when given invalid data argument. Fixed by putting close in "try-after". A closed port could in same cases get stuck in limbo due to data in io-queue. Fixed by adding a flush callback.
2012-02-21Add missing HAVE_IN6 && AF_INET6 ifdefPeer Stritzinger
This prevents building for operating systems that do not yet have IPv6 compatible socket API. Error can be reproduced by (cross)building for a os that doesn't have these headers. This will abort with a error about incomplete type 'struct in6_addr'. All other uses of IPv6 API in inet_drv.c are conditionalized like in the patch.
2012-02-21erts: Fix compiler warning in inet_drvSverker Eriksson
2012-01-23Merge branch 'jz/error-logic-efile_sendfile' into maintHenrik Nord
* jz/error-logic-efile_sendfile: erts: minor fix for unnecessary condition OTP-9872
2012-01-23Merge branch 'jz/sendfile_chunk_size' into maintHenrik Nord
* jz/sendfile_chunk_size: erts: change SENDFILE_CHUNK_SIZE from signed to unsigned Conflicts: erts/emulator/drivers/unix/unix_efile.c OTP-9872
2012-01-18Merge branch 'raimo/64-bit-efile_drv/OTP-9820' into maintErlang/OTP
* raimo/64-bit-efile_drv/OTP-9820: file_SUITE: Assume 64-bit windows has enough memory erts: Badarg if port output overflows iov_len prim_file_SUITE: large_file success depends on wordsize file_SUITE: Increase timeout for large_file file_SITE,prim_file_SUITE: Accept old OpenBSD pecularity prim_file_SUITE: large_write - meaner test data and check result content file_SUITE: large_write - check mem size before creating huge binary erts: rewrite efile_writev to handle partial writes correctly erts: Bugfix - driver_deq freed wrong length due to short type (int) prim_file_SUITE: Add large_write/1 file_SUITE: Add large_write/1 file_SUITE: Refactor large_file/1 file_SUITE: Fix unix_free/1
2012-01-04Fix returned error from gen_tcp:accept/1,2 when running out of portsPer Hedeland
The {error, enfile} return value is badly misleading and confusing for this case, since the Posix ENFILE errno value has a well-defined meaning that has nothing to do with Erlang ports. The fix changes the return value to {error, system_limit}, which is consistent with e.g. various file(3) functions. inet:format_error/1 has also been updated to support system_limit in the same manner as file:format_error/1.
2011-12-20erts: rewrite efile_writev to handle partial writes correctlyRaimo Niskanen
2011-12-19erts: Better suppression of uninitialised sctp_sndrcvinfoSverker Eriksson
2011-12-09Update copyright yearsBjörn-Egil Dahlberg
2011-12-09Merge branch 'raimo/64-bit-driver-api/OTP-9795'Björn Gustavsson
* raimo/64-bit-driver-api/OTP-9795: (22 commits) driver_SUITE.erl: Fix sys info drivers emulator test drivers: Conform to updated driver API runtime_tools's drivers: Conform to updated driver API ws's xwe_driver.c: Conform to updated driver API megaco's flex scanner: Conform to updated driver API seq_trace_SUITE_data/echo_drv.c: Conform to updated driver API erl_interface tests: Conform port_call_drv.c updated driver API erl_drv_thread_SUITE_data/testcase_driver.c: Conform to updated driver API float_SUITE_data/fp_drv.c: Conform to updated driver API port_SUITE_data/*_drv.c: Conform to updated driver API port_bif_SUITE_data/control_drv.c: Conform to updated driver API send_term_SUITE_data/send_term_drv.c: Conform to updated driver API system_profile_SUITE_data/echo_drv.c: Conform to updated driver API trace_port_SUITE_data/echo_drv.c: Conform to updated driver API Remove support for old drivers without ERL_DRV_EXTENDED_MARKER built-in drivers: Add ERL_DRV_EXTENDED_MARKER and version numbers Bump driver version to 2.0 erl_driver.h: Enlarge type on return value from call erl_driver.h: Enlarge types on driver callbacks output, control and call erl_driver.h: Enlarge types in driver output functions ... Conflicts: erts/emulator/test/driver_SUITE_data/monitor_drv.c erts/emulator/test/driver_SUITE_data/timer_drv.c
2011-12-09built-in drivers: Add ERL_DRV_EXTENDED_MARKER and version numbersBjörn Gustavsson
2011-12-09erl_driver.h: Enlarge types on driver callbacks output, control and callRaimo Niskanen
2011-12-08Merge branch 'ta/sendfile/OTP-9240'Lukas Larsson
* ta/sendfile/OTP-9240: Do not use async threads on DARWIN Fix cleanup when sendfile process crashes Return {error,closed} from sendfile if closed Do not use SFV_NOWAIT as it does not exist on all solaris Clarify some code comments Make solaris use sendfilev
2011-12-08Merge branch 'sverk/misc-valgrind-fixes'Sverker Eriksson
* sverk/misc-valgrind-fixes: erts: Suppress valgrind warning about syscall sendmsg erts: Fix memory leak in test drivers erts: Small fix in inet_drv.c:sctp_set_opts
2011-12-08Do not use async threads on DARWINLukas Larsson
2011-12-08Fix cleanup when sendfile process crashesLukas Larsson
When sendfile crashes during a send there should be no error_logger printouts about stolen fds.
2011-12-08Merge branch 'egil/file-info-opt-utc/OTP-7687'Björn-Egil Dahlberg
* egil/file-info-opt-utc/OTP-7687: (39 commits) Remove time_t specific test in prim_file_SUITE Update prim_file.beam and prim_zip.beam Add types for posixtime_to_universaltime and the reverse Set BASEYEAR to 1902 Set lower limit of years handled to 1601 Emulate localtime, gmtime and mktime to enable negative time_t Document file:*_file_info/2 Fix compiler warning in unix_efile.c Change name of bif universaltime_to_seconds/1 Change options to prim_file:*_file_info/* Remove dead code Catch errors from prim_file:*_file_info Testcase for utc <-> seconds conversion Fix negative time in seconds_to_universaltime/1 Remove OS taint from datetime conversion Add utc <-> seconds conversions bifs Let prim_file validate ctime in file_info Teach #file_info spec unix epochs for file times Add file_info_opt tests in prim_file_SUITE unix_efile: Zero is a valid number in utime ... Conflicts: erts/emulator/beam/erl_time_sup.c erts/emulator/sys/win32/erl_win_sys.h erts/emulator/sys/win32/sys_time.c
2011-12-08Fix compiler warning in unix_efile.cBjörn-Egil Dahlberg
2011-12-08unix_efile: Zero is a valid number in utimeBjörn-Egil Dahlberg
Both mtime and atime were incorrectly checked for zero