aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
AgeCommit message (Collapse)Author
2012-06-05Update to work with whitespace in exec pathLukas Larsson
OTP-10106 OTP-10107
2012-05-30Fix chunk usage checkLukas Larsson
2012-05-23Merge branch 'lukas/kernel/fix-gen_udp_tcp-leak/OTP-10094' into maintLukas Larsson
* lukas/kernel/fix-gen_udp_tcp-leak/OTP-10094: Add testcase for controlling_process(P,self()) Fix port leaking after controlling_process(Port, self())
2012-04-16kernel: Remove bit8 option in specBjörn-Egil Dahlberg
* The option is removed to force warnings for dialyzer
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-22Rename dyntrace BIFs to more suiting namesPatrik Nyblom
2012-03-22Correct some errors in the user tag spreadingPatrik 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-20Make sure disk_log does not write too much dataHans Bolinder
While disk_log eagerly collects logged data for better performance, collecting too much data may choke the system and cause huge binaries to be written. The problem was addressed in OTP-9764, but the situation was not improved in all cases. Thanks to Richard Carlsson.
2012-03-20Merge branch 'bjorn/kernel/erts_debug_size-fix/OTP-9991' into maintBjörn Gustavsson
* bjorn/kernel/erts_debug_size-fix/OTP-9991: Improve erts_debug_SUITE Fix calculation of fun size in erts_debug:size/1
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-19Fix calculation of fun size in erts_debug:size/1Björn Gustavsson
Funs would be calculated using erts_debug:flat_size/1.
2012-03-16gen_tcp: Use correct specs for accept and listenBjörn-Egil Dahlberg
2012-03-16Merge branch 'rj/fix-global-spec' into maintGustav Simonsson
* rj/fix-global-spec: Improve global:re_register_name/2,3 spec Fix global:{random_exit_name,random_notify_name}/3 spec
2012-03-01Improve global:re_register_name/2,3 specRicardo Catalinas Jiménez
Both functions always return `yes'.
2012-03-01Merge branch 'mh/create_cookie_error_msg' into maintGustav Simonsson
* mh/create_cookie_error_msg: Specify file name and error on create_cookie failure OTP-9954
2012-03-01Fix global:{random_exit_name,random_notify_name}/3 specRicardo Catalinas Jiménez
Both functions return pid(), not 'none'. The one that always returns 'none' is notify_all_name/3.
2012-02-04Fix port leaking after controlling_process(Port, self())Ricardo
Add case to handle the situation when someone call {gen_tcp,gen_udp}:controlling_process(Port, self()). Also improve spec and doc from gen_udp and gen_sctp for controlling_process/2. To reproduce the issue, open an UDP port: 4> {ok,Port} = gen_udp:open(9000, [binary]). {ok,#Port<0.587>} 5> gen_udp:controlling_process(Port, self()). ok Simulate error: 6> 1=2. ** exception error: no match of right hand side value 2 Here is the leak: 7> inet:i(). Port Module Recv Sent Owner Local Address Foreign Address State Type 581 inet_udp 0 0 <0.31.0> *:cslistener *:* BOUND DGRAM ok
2012-01-25Merge branch 'bjorn/kernel/on_load-bug/OTP-9875' into maintBjörn Gustavsson
* bjorn/kernel/on_load-bug/OTP-9875: Fix on_load handling in modules loaded by code:load_binary/3
2012-01-23Fix on_load handling in modules loaded by code:load_binary/3Björn Gustavsson
In "13.4 Running a function when a module is loaded" in the Reference Manual, it is said that: A process that calls any function in a module whose on_load function has not yet returned will be suspended until the on_load function has returned. That did not work if the module was loaded using code:load_binary/3. Instead, the callers would get an 'undef' exception.
2012-01-23Correct two contracts in gen_sctp.erlHans Bolinder
binary should be binary().
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-09Update copyright yearsBjörn-Egil Dahlberg
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 '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-08Document file:*_file_info/2Björn-Egil Dahlberg
* file:read_file_info/2 * file:write_file_info/3 Document options and time behavior.
2011-12-08Remove dead codeBjörn-Egil Dahlberg
2011-12-07Return {error,closed} from sendfile if closedLukas Larsson
If the socket is closed by the remote end, sendfile now returns {error,closed}.
2011-12-07Remove debug printoutHans Bolinder
2011-12-06Merge branch 'ta/docs'Henrik Nord
* ta/docs: Fix misspelling of chosen Fix typos in erl(1) Fix misspelling of 'turn off' Fix typo in reltool(3) Fix typo in gen_sctp(3) Fix typo in mod_responsecontrol.erl Fix typo in erts_alloc(3) Fix typos in ssl_cipher.erl Fix typos in expressions.xml file: correct make_link/2 and make_symlink/2 docs Fix typo in test_server(3) Fix typos in io_protocol.xml Fix typo in erlang(3) Fix typos in tar_SUITE Fix typos in erts/preloaded/src OTP-9787
2011-12-06Merge branch 'ao/fix-change-time-inval-dates'Henrik Nord
* ao/fix-change-time-inval-dates: Fix a crash when file:change_time/2,3 are called with invalid dates OTP-9785
2011-12-05file: correct make_link/2 and make_symlink/2 docsTuncer Ayaz
2011-12-05Merge branch 'sa/dialyzer-fixes'Henrik Nord
* sa/dialyzer-fixes: Correct callback spec in application module Refine warning about callback specs with extra ranges Cleanup autoimport compiler directives Fix Dialyzer's warnings in typer Fix Dialyzer's warning for its own code Fix bug in Dialyzer's behaviours analysis Fix crash in Dialyzer OTP-9776
2011-12-05Merge branch 'hb/kernel/too_greedy_disk_log/OTP-9764'Hans Bolinder
* hb/kernel/too_greedy_disk_log/OTP-9764: Make sure disk_log does not write too much data
2011-12-04Make sure disk_log does not write too much dataHans Bolinder
While disk_log eagerly collects logged data for better performance, collecting too much data may choke the system and cause huge binaries to be written. (Reported by Klarna.) (Logging data faster than the speed disk_log can write to disk can still cause problems.)
2011-12-02Add spec for file:read_link_info/2Björn-Egil Dahlberg
2011-12-02Move datetime into prim_fileBjörn-Egil Dahlberg
2011-12-02stdlib: Fix return file_info on epochBjörn-Egil Dahlberg
2011-12-02Fix undefined datetimesBjörn-Egil Dahlberg
2011-12-02Teach file.erl datetime conversionsBjörn-Egil Dahlberg
2011-12-02Merge branch 'ta/sendfile/OTP-9240'Lukas Larsson
* ta/sendfile/OTP-9240: (31 commits) Add sendfile server printouts Skip recv/send during tests for fallback platforms Remove header/trailer support Remove windows implementation Expand sendfile documentation Only allow tcp sockets as target for sendfile Move sendfile api to file module Preliminary work on header/trailer Use free_sendfile explicitly for non-async Remove debug printouts Add tests for send/recv/sendfile interactions Remove tests for file_server sendfile sendfile caller now has to be the controlling_process Remove support for file_server, sendfile has to be raw Set chunk size to 3 GB Change type of fd to be ErlDrvEvent Add ifdef's for HAVE_SENDFILE Fix freebsd support for sendfile Change nbytes to 64 bit Implement ignorefd for TCP ...
2011-12-02Remove header/trailer supportLukas Larsson
Since the API for headers/trailers seem to be very awkward to work with when using non-blocking io the feature is dropped for now. See unix_efile.c for more details.
2011-12-02Expand sendfile documentationLukas Larsson
2011-12-02Move sendfile api to file moduleLukas Larsson
Since sendfile could in theory be used to send to any type of file descriptor in *nix, it is a better fit to have it in file.
2011-12-01Preliminary work on header/trailerLukas Larsson
Have to figure out how to represent progress in header writing when using non-blocking, not sure how to do this.
2011-12-01sendfile caller now has to be the controlling_processLukas Larsson
This is needed because otherwise there could be scenarios when the efile driver blocks a fd and then crashes without the inet driver ever finding out. Now when the process crashes the port will close and we can cleanup in the inet driver.
2011-12-01Remove support for file_server, sendfile has to be rawLukas Larsson
Because the sending process has to be the controlling process of the tcp socket used to send data it is not possible to use the file_server
2011-12-01Implement ignorefd for TCPLukas Larsson
Ignore fd is a feature used by sendfile to temporarily remove all driver_select calls on that fd so that another driver can select on it. It also delays all actions which sends or receives data in that fd until in the fd is no longer ignored. Only the controlling_process should use the feature as it is otherwise possible that the ignore will never be cleaned up and hence create a memory leak in the driver. An ignored driver will not detect that an fd has been closed until it is unignored.