aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
AgeCommit message (Collapse)Author
2013-04-15Update kernel.appup.src for R17Siri Hansen
2013-04-15Merge branch 'lh/demonitor-flush/OTP-11039' into maintFredrik Gustafsson
* lh/demonitor-flush/OTP-11039: Use erlang:demonitor(Ref, [flush]) where applicable
2013-04-11Optimize communication with file io serverAnthony Ramine
The file module communicates with a file io server with the following protocol for file operations: > {file_request,From,ReplyAs,Request} < {file_reply,ReplyAs,Reply} The ReplyAs value is sent by the client side to match against when receiving the reply and is otherwise left untouched and passed as is by the server. This commit enables receive optimizations by using the reference of the server monitor, changing the protocol to: > {file_request,From,MonitorRef,Request} < {file_reply,MonitorRef,Reply} As the shape of the messages is not changed, backwards compatibility is not a concern.
2013-04-05Use erlang:demonitor(Ref, [flush]) where applicableLoïc Hoguin
2013-03-05kernel: Add application:ensure_started/1,2Björn-Egil Dahlberg
Similar to application:start/1,2 except it returns 'ok' on already started applications instead of {'error', {'already_started', ...}}.
2013-02-22Update copyright yearsBjörn-Egil Dahlberg
2013-02-21Introduce new type file:name_all()Hans Bolinder
2013-02-20Merge branch 'ks/hipe_bif-remove_refs_from/OTP-10851'Fredrik Gustafsson
* ks/hipe_bif-remove_refs_from/OTP-10851: Fixed test to allow for lists:foreach/2 call Change the return value of hipe_bifs:remove_refs_from/1
2013-02-19Use ~ts for filenamesHans Bolinder
2013-02-18Fix broken file:read_link_all/1Björn Gustavsson
It produced the same result as file:read_link/1.
2013-02-15Merge branch 'sc/gen_tcp_send_error_closed/OTP-10839'Fredrik Gustafsson
* sc/gen_tcp_send_error_closed/OTP-10839: Fix type of error Reason on gen_tcp:send/2
2013-02-14Merge branch 'bjorn/stdlib/types'Björn Gustavsson
* bjorn/stdlib/types: Make the file:filename() type more restrictive c: Remove handling of binaries in return from file:list_dir/1
2013-02-13[kernel] FIx a bug that could cause crash with wrong reasonHans Bolinder
2013-02-13Make the file:filename() type more restrictiveBjörn Gustavsson
The recommended type for filenames is a list of characters (which may be Unicode characters greater than 255). Change the file:filename() to reflect that. For the filename module we still need a type that can be either a string or a binary, so we need to introduce the type file:filename_all().
2013-02-13Change the return value of hipe_bifs:remove_refs_from/1Kostis Sagonas
In order to avoid an ummatched return warning in erts and make the code more sane, the return value of the bif was changed from [] to 'ok'. (Probably more hipe_bifs need such changes but they will have to wait.) While at it, the code of various functions in hipe_unified_loader was shortened by using lists:foreach/1 instead of explicit recursion.
2013-02-12Merge branch 'pan/unicode_filename_warnings'Björn Gustavsson
* pan/unicode_filename_warnings: Add file:list_dir_all/1 and file:read_link_all/1 prim_file: Add list_dir_all() and read_link_all() Teach prim_file:set_cwd() to avoid entering non-translatable directories Make prim_file skip invalid filenames in unicode mode prim_file: Refactor functions that return filenames prim_file: Refactor handling of responses prim_file: Always open non-file ports in binary mode Test that list_dir("non-existing-dir") fails with the correct error
2013-02-11Fix type of error Reason on gen_tcp:send/2Sean Cribbs
When the TCP socket is in passive mode, it is possible that a close message has not been delivered to the controlling process before calling send/2. This results in the returning {error, closed} to the caller, in the same way that recv/2,3 does. This commit adjusts the type of the error "Reason" to include the atom 'closed'.
2013-02-11Add file:list_dir_all/1 and file:read_link_all/1Björn Gustavsson
2013-02-11Make Unicode correctionsHans Bolinder
2013-02-11Merge branch 'vd/code_get_mode/OTP-10823'Fredrik Gustafsson
* vd/code_get_mode/OTP-10823: Added name prefix to code.xml Add a new function code:get_mode() can be used to detect how the code servers behaves
2013-02-06Merge branch 'mh/duplicate_name_error_message/OTP-10797'Fredrik Gustafsson
* mh/duplicate_name_error_message/OTP-10797: Slightly nicer error message when node start fails due to duplicate name
2013-02-01Add a new function code:get_mode() can be used to detect how the code ↵Vlad Dumitrescu
servers behaves Rationale: Some applications (like erlide) have code to be loaded dynamically on a node. It may be slow to load everything upfront every time, so if the node is in interactive mode, we would like to just append to the load path. Currently, there is no direct way to detect if the node is running in embedded mode or not so that we can do the right thing.
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-25Slightly nicer error message when node start fails due to duplicate nameMagnus Henoch
When starting up an Erlang node using a node name that is already in use, the new node used to crash with output starting with this message: {error_logger,{{2013,1,25},{16,0,42}},"Protocol: ~p: register error: ~p~n",["inet_tcp",{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1,[..... With this change, the first line in the output changes to: {error_logger,{{2013,1,25},{16,40,41}},"Protocol: ~tp: the name foo@localhost seems to be in use by another Erlang node",["inet_tcp"]}
2013-01-25Make adjustments for UnicodeHans Bolinder
2013-01-25[kernel] Correct bugs in the old shell (user.erl)Hans Bolinder
The inline attribute has been simplified due to problems with compiling to native code. The exact cause it beyond the scope of this commit.
2013-01-25[stdlib] Remove documentation of Unicode functions in io_libHans Bolinder
The documentation of some Unicode functions in io_lib was committed by mistake.
2013-01-24Merge branch 'bjorn/warnings-zero-tolerance'Björn Gustavsson
* bjorn/warnings-zero-tolerance: Turn warnings to errors on selected applications runtime_tools_sup: Eliminate warning inet_parse: Eliminate a compiler warning
2013-01-23Merge branch 'sverk/r16/utf8-atoms'Sverker Eriksson
* sverk/r16/utf8-atoms: erl_interface: Fix bug when transcoding atoms from and to UTF8 erl_interface: Changed erlang_char_encoding interface erts: Testcase doing unicode atom printout with ~w erl_interface: even more utf8 atom stuff erts: Fix bug in analyze_utf8 causing faulty latin1 detection Add UTF-8 node name support for epmd workaround... Fix merge conflict with hasse UTF-8 atom documentation test case erl_interface: utf8 atoms continued Add utf8 atom distribution test cases atom fixes for NIFs and atom_to_binary UTF-8 support for distribution Implement UTF-8 atom support for jinterface erl_interface: Enable decode of unicode atoms stdlib: Fix printing of unicode atoms erts: Change internal representation of atoms to utf8 erts: Refactor rename DFLAG(S)_INTERNAL_TAGS for conformity Conflicts: erts/emulator/beam/io.c OTP-10753
2013-01-23Turn warnings to errors on selected applicationsBjörn Gustavsson
2013-01-23inet_parse: Eliminate a compiler warningBjörn Gustavsson
The warning was introduced in e367eb44969b00cac910c8eb14e7b3ce3ee0cc91.
2013-01-19Add search to Erlang shell's historyFred Hebert
Search mode can be entered by pressing ctrl-r. Enter terms and press ctrl-r again to search backwards, or ctrl-s to then search forward (if you terminal doesn't eat up that one). Press enter to execute the line, or use tab, arrow keys, or other control sequences (^D, ^K, etc.) to exit search mode while remaining on the last found line. Exiting is also possible by pressing the escape key twice. The search mode is a simpler version of the one available in bash or zsh shells. This adds a few modes to the shell (search, on top of none and meta) in group.erl for history search, and a few more in edlin.erl to change the meaning of control sequences while searching.
2013-01-18Merge branch 'nox/enable-silent-rules/OTP-10726'Björn-Egil Dahlberg
* nox/enable-silent-rules/OTP-10726: Implement ./otp_build configure --enable-silent-rules
2013-01-18Merge branch 'bjorn/kernel/undefined-function-handler/OTP-10617'Björn Gustavsson
* bjorn/kernel/undefined-function-handler/OTP-10617: Teach error_handler to call '$handle_undefined_function'
2013-01-17Merge branch 'sal/get_env/OTP-10694'Fredrik Gustafsson
* sal/get_env/OTP-10694: Moved documentation in a separate entry Removed obsolete ?line macro Add application:get_key/3
2013-01-16UTF-8 support for distributionRickard Green
2013-01-15Implement ./otp_build configure --enable-silent-rulesAnthony Ramine
With silent rules, the output of make is less verbose and compilation warnings are easier to spot. Silent rules are disabled by default and can be disabled or enabled at will by make V=0 and make V=1.
2013-01-14Add application:get_key/3serge
The new function provides a default value for a configuration parameter.
2013-01-14Teach error_handler to call '$handle_undefined_function'Björn Gustavsson
2013-01-11Merge branch 'fdm/file-allocate/OTP-10680'Björn-Egil Dahlberg
* fdm/file-allocate/OTP-10680: Update preloaded prim_file.beam erts: Fix xcomp configure for fallocate Add file:allocate/3 operation
2013-01-09Add file:allocate/3 operationFilipe David Manana
This operation allows pre-allocation of space for files. It succeeds only on systems that support such operation. The POSIX standard defines the optional system call posix_fallocate() to implement this feature. However, some systems implement more specific functions to accomplish the same operation. On Linux, if the more specific function fallocate() is implemented, it is used instead of posix_fallocate(), falling back to posix_fallocate() if the fallocate() call failed (it's only supported for the ext4, ocfs2, xfs and btrfs file systems at the moment). On Mac OS X it uses the specific fcntl() operation F_PREALLOCATE, falling back to posix_fallocate() if it's available (at the moment Mac OS X doesn't provide posix_fallocate()). On any other UNIX system, it uses posix_fallocate() if it's available. Any other system not providing this system call or any function to pre-allocate space for files, this operation always fails with the ENOTSUP POSIX error.
2013-01-09kernel: Remove the packages moduleBjörn Gustavsson
2013-01-09kernel: Eliminate use of packages in code and code_serverBjörn Gustavsson
2013-01-03Merge branch 'ks/kernel/dist_util-minor-fix/OTP-10662'Fredrik Gustafsson
* ks/kernel/dist_util-minor-fix/OTP-10662: Do not return wrong terms unnecessarily
2013-01-02Make sure the Erlang shell prompt can handle UnicodeHans Bolinder
2013-01-02Correct bugs in the old shell (user.erl)Hans Bolinder
2013-01-02[stdlib, kernel] Introduce Unicode support for Erlang source filesHans Bolinder
Expect modifications, additions and corrections. There is a kludge in file_io_server and erl_scan:continuation_location() that's not so pleasing.
2012-12-20Move ram option from mode() type into open/2 specPatrik Nyblom
The mode() type is used in path_open and copy, two functions that do _not_ accept the ram option (or is at least not supposed to), why I moved the option 'ram' from the type down to the spec for open itself. That also makes the option visible directly under open/2 in the documentation.
2012-12-20Basic documentation of the 'ram' mode in the 'file' moduleJan Daniel Bothma
2012-12-13Do not return wrong terms unnecessarilyKostis Sagonas