aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
AgeCommit message (Collapse)Author
2010-06-08OTP-8686 Bugfix net_kernelHans Bolinder
A bug introduced in kernel-2.13.5.3 has been fixed.
2010-06-07Merge branch 'ms/file-exclusive-mode' into devErlang/OTP
* ms/file-exclusive-mode: Update preloaded modules Support opening files in exclusive mode OTP-8670 ms/file-exclusive-mode There is a new option 'exclusive' to file:open/2 that uses the OS O_EXCL flag where supported to open the file in exclusive mode.
2010-06-04Support opening files in exclusive modeMichael Santos
Add an option that atomically tests for the existence of a file and creates it if the file does not exist, by passing the O_EXCL flag to open() on Unix and CREATE_NEW flag on Windows. Support for O_EXCL varies across platforms and filesystems. {ok, Fd} = file:open("/tmp/foo", [write,exclusive]), {error, eexist} = file:open("/tmp/foo", [write,exclusive]).
2010-06-03kernel: Add declaration for exported typesKostis Sagonas
2010-06-03Merge branch 'pan/otp_8611_standard_io' into devErlang/OTP
* pan/otp_8611_standard_io: Teach file:write/read/read_line about named io_servers OTP-8611 file:write,read and read_line on named io_device() The file module's functions write,read and read_line now handles named io_servers like 'standard_io' and 'standard_error' correctly.
2010-06-03Merge branch 'pan/otp_3626_win_find_executable' into devErlang/OTP
* pan/otp_3626_win_find_executable: Teach os.erl to find executable names with extension (i.e. .exe) on windows OTP-3626 os:find_executable bug on Windows os:find_executable can now be fed with the complete name of the executable on Windows and still find it. I.e os:find_executable("werl.exe") will work as os:find_executable("werl").
2010-06-02Teach os.erl to find executable names with extension (i.e. .exe) on windowsPatrik Nyblom
2010-06-02Merge branch 'am/net_kernel_catchall' into devErlang/OTP
* am/net_kernel_catchall: Add catch all handle_call to net_kernel
2010-06-02Merge branch 'rn/resolver-leaking-ports' into devErlang/OTP
* rn/resolver-leaking-ports: Resolver: make inet_dns decode ugly truncated reply Resolver: stop inet_res leaking ports OTP-8652 inet_res leaking ports The kernel DNS resolver was leaking one or two ports if the DNS reply could not be parsed or if the resolver(s) caused noconnection type errors. Bug now fixed. A DNS specification borderline truncated reply triggering the port leakage bug has also been fixed.
2010-06-01Add catch all handle_call to net_kernelAntonio SJ Musumeci
Of the core networking apps only net_kernel fails to have a catchall for unknown gen_server:call messages causing it to exit and eventually bring down kernal_sup and beam if it had not been manually started. For stability and consistancy it has been altered to include a catchall which does not reply.
2010-06-01Teach file:write/read/read_line about named io_serversPatrik Nyblom
2010-06-01OTP-8643 Improvements of net_kernelHans Bolinder
Under certain circumstances the net kernel could hang. (Thanks to Scott Lystig Fritchie.)
2010-06-01Merge branch 'bg/dist_utils' into devErlang/OTP
* bg/dist_utils: dist_utils: Eliminate crash when list_to_existing_atom/1 fails
2010-06-01Resolver: make inet_dns decode ugly truncated replyRaimo Niskanen
Bugfix: a DNS reply with the truncation bit set containing misleading section length (i.e header claimed length greater than what was actually in the reply section) in the header caused decode error in inet_dns.
2010-06-01Resolver: stop inet_res leaking portsRaimo Niskanen
Bugfix: when all nameservers return a reply causing decode errors or when errors enetunreach or econnrefused occured while contacting them, one or two UDP ports was leaked i.e left open and forgotten.
2010-06-01dist_utils: Eliminate crash when list_to_existing_atom/1 failsBjörn Gustavsson
In the following scenario list_to_existing_atom/1 may crash during handshake: Start a node in one window: erl -sname adam@localhost Start another node in another window: erl -sname bertil In this node, ping the first node (use the actual hostname in the command): net:ping(adam@hostname). There will be an error report similar to: =ERROR REPORT==== 27-May-2010::15:03:14 === Error in process <0.40.0> on node 'bertil@hostname' with exit value: {badarg,[{erlang,list_to_existing_atom, ["adam@localhost"]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]} Eliminate the crash and the error report by catching the call to list_to_existing_atom/1 and do a clean shutdown if it fails.
2010-05-31OTP-8653 pg2: bug fixHans Bolinder
When exchanging groups between nodes pg2 did not remove duplicated members. This bug was introduced in R13B03 (kernel-2.13.4).
2010-05-24Merge branch 'fm/file-operations' into devErlang/OTP
* fm/file-operations: Update preloaded modules Add file:advise/4 - a wrapper to the POSIX syscall posix_fadvise Add file:datasync/1 for syncing file contents only sys.h: Correct the get_int64() macro OTP-8637 fm/file-operations The functions file:advise/4 and file:datasync/1 have been added. (Thanks to Filipe David Manana.)
2010-05-20Add file:advise/4 - a wrapper to the POSIX syscall posix_fadviseFilipe David Manana
Useful for informing the Operating System about the access pattern for a file's data, so that it can adapt the caching strategy to maximize disk IO performance.
2010-05-20Add file:datasync/1 for syncing file contents onlyFilipe David Manana
file:datasync/1 invokes the POSIX system call "int fdatasync(int fd)". This system call is similar to "fsync" but, unlike fsync, it does not update the metadata associated with the file (like the access time for example). It's used by many DBMSs (MySQL and SQLite of example) to increase disk IO performance, as it avoids disk seeks and disk write operations compared to fsync. More details on it at: http://linux.die.net/man/2/fdatasync An example, from the MySQL source: http://bazaar.launchpad.net/~mysql/mysql-server/mysql-5.1-telco-6.1/annotate/head%3A/mysys/my_sync.c#L61 This new function just calls fsync on systems not implementing fdatasync.
2010-05-19Merge branch 'dp/shell-line-editing' into devErlang/OTP
* dp/shell-line-editing: Readline-style line edit history OTP-8635 dp/shell-line-editing The shell's line editing has been improved to more resemble the behaviour of readline and other shells. (Thanks to Dave Peticolas)
2010-05-06Merge branch 'bg/file-del_dir' into devErlang/OTP
* bg/file-del_dir: Adjust test of file:del_dir("..") to accept {error,einval}
2010-05-05Adjust test of file:del_dir("..") to accept {error,einval}Björn Gustavsson
On FreeBSD, file:del_dir("..") will return {error,einval} rather than the expected {error,eexist}, and so will file:del_dir("../.."), and so on. It could be argued that we should change the implementation of file:del_dir/1 to remap the error code (as some other error codes are remapped to reduce the differences between different platforms), but the consistency gained does not seem to be worth the effort. Therefore, until we'll find a real-world use case where it is essential to have consistent error codes for file:del_dir("..") on all platforms, change the test case to accept both errors.
2010-04-30kernel tests: Remove stray OSE/Delta supportBjörn Gustavsson
2010-04-29Merge branch 'ks/kernel' into devErlang/OTP
* ks/kernel: kernel: Clean up as suggested by tidier OTP-8606 ks/kernel
2010-04-28kernel: Clean up as suggested by tidierKostis Sagonas
2010-04-19code:clash/0: match correct return value from erl_prim_loader:list_dir/1Tuncer Ayaz
erl_prim_loader:list_dir/1 returns error on failure and not {error,_}. Also update tests in code_SUITE:clash/1. Defect was introduced with fix for listing .ez archives in 49da83de4b. Initial code:clash/0 tests added in 79194d5fa7. Signed-off-by: Tuncer Ayaz <[email protected]>
2010-04-14Merge branch 'jb/inet6-dist' into devErlang/OTP
* jb/inet6-dist: Support IPv6 addresses in long host names Fix implementation of IPv6 TCP distribution protocol Fix compilation of epmd with IPv6 enabled OTP-8575 jb/inet6-dist
2010-04-13Support IPv6 addresses in long host namesJohn-Mark Bell
When distributing over IPv4, node@<IPv4-address> (e.g. [email protected]) works correctly. Permit node@<IPv6-address> (e.g. node@::1) when distributing over IPv6.
2010-03-30Merge branch 'mh/doc-inet-getopts' into devErlang/OTP
* mh/doc-inet-getopts: Doc fix: inet:getopts/2 returns {ok, OptionValues}, not just OptionValues
2010-03-26Doc fix: inet:getopts/2 returns {ok, OptionValues}, not just OptionValuesMagnus Henoch
2010-03-23Fix implementation of IPv6 TCP distribution protocolJohn-Mark Bell
TCP distribution over IPv6 did not work. The TCP socket was forcibly closed before any communication could take place. The following changes resolve this: * Make the kernel use the inet6 variant of accept. * Use inet6 variants of TCP socket functions. * Ensure that the inet6 address family is used in all cases.
2010-03-19OTP-8527 Global no longer supports R11B nodesHans Bolinder
As of this version, the global name server no longer supports nodes running Erlang/OTP R11B.
2010-03-19kernel: document the file:change_mode/2 functionAndrey Pampukha
2010-03-16Merge branch 'ml/documentation_apostrophe_fix' into devErlang/OTP
* ml/documentation_apostrophe_fix: Correct grammatical problems in conjunction with 'its' Change all incorrect occurrences of it's to its OTP-8523 ml/documentation_apostrophe_fix
2010-03-16Correct grammatical problems in conjunction with 'its'Matthias Lang
2010-03-16Change all incorrect occurrences of it's to itsMatthias Lang
The documentation (*.xml) in the otp tree has a common grammatical problem, "it's" and "its" are often interchanged. That is annoying for some readers. This commit consists entirely of "it's" -> "its" changes. I went through every .xml file in the tree. If there are any remaining bugs of this type, it's because I missed them, not because I didn't look.
2010-03-10OTP-8502 os:cmd hangRickard Green
A race condition in os:cmd/1 could cause the caller to get stuck in os:cmd/1 forever.
2010-03-09Readline-style line edit historyDave Peticolas
Change the shell's line buffer mechanism to more closely match readline-based shells. New behavior: 1. Blank lines are not added to the line buffer. 2. Pressing the down arrow on the last line causes no change. The previous behavior erased the line. 3. The new line is temporarily added to the line buffer so the user can move to previous lines with up arrows and then back to the new line with down arrows. The previous behavior discarded the partially written new line. 4. Changes made to previous lines while exploring the line buffer history are preserved. The previous behavior discarded changes made to older lines.
2010-03-09Merge branch 'ks/types' into devErlang/OTP
* ks/types: file.hrl: Move out type declarations kernel: Add types and specs OTP-8494 ks/types
2010-03-07file.hrl: Move out type declarationsKostis Sagonas
Having various type declarations in the file.hrl file was once upon a time necessary since the system could not really handle remote types. Now it can and these declarations should not be there but appear in file.erl instead. This means that files that need to use these types can refer to them using a remote type reference, and not having to include file.hrl - at least not for this reason.
2010-03-07kernel: Add types and specsKostis Sagonas
2010-03-02OTP-8471 kernel: race in disk_log_SUITEHans Bolinder
2010-02-24Update version for R14ARickard Green
2010-02-19Update release notesBjörn-Egil Dahlberg
2010-02-18OTP-8451 Harmless buffer overflow by one byte in asn1 and ram_file_drv.Sverker Eriksson
2010-02-14file.erl: Add a type to be used from other modulesKostis Sagonas
2010-02-10OTP-8418 user.erl (used in oldshell) is updated to handle unicode inPatrik Nyblom
prompt strings (io:get_line/{1,2}). io_lib is also updated to format prompts with the 't' modifier (i.e. ~ts instead of ~s).
2010-02-10Support the configure option --enable-native-libsKostis Sagonas
2010-02-10Merge branch 'mp/hipe_unified_loader' into ccase/r13b04_devErlang/OTP
* mp/hipe_unified_loader: hipe_unified_loader: only block SMP scheduling when necessary