aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
AgeCommit message (Collapse)Author
2011-08-30Merge branch 'dev' into majorHenrik Nord
2011-08-30Merge branch 'ft/fix_supervisor_temporary_restart' into devHenrik Nord
OTP-9502
2011-08-29Merge branch 'dev' into majorHenrik Nord
2011-08-29Merge branch 'rz/add_proplist_type' into devHenrik Nord
* rz/add_proplist_type: Add a proplist() type OTP-9499
2011-08-25Merge branch 'bjorn/line-numbers-in-exceptions/OTP-9468' into majorBjörn Gustavsson
* bjorn/line-numbers-in-exceptions/OTP-9468: (51 commits) debugger: By default, only save non-tail-recursive calls debugger: Add line_number_SUITE debugger: Include line numbers in exceptions Update examples in the documentation to include line numbers Update documentation for erlang:raise/3 and erlang:get_stacktrace/0 beam_lib: Retain the "Line" chunk when stripping BEAM files erl: Add +L to suppress loading of line number information compiler: Add no_line_info for suppressing line/1 instructions exception_SUITE: Test line numbers in exceptions common_test: Use line numbers in exceptions common_test tests: Don't do detailed testing of the stack backtrace test_server: Refactor init_per_testcase/3 into two functions Implement process_info(Pid, current_{location,stacktrace}) beam_emu: Factor out saving of stack trace from save_stacktrace() compiler: Don't create filenames starting with "./" ops.tab: Remove line instructions before tail-recursive calls Lookup and include filenames and line numbers in exceptions Fix decrement of continuation pointers Refactor building of the exception stacktrace BEAM loader: Load the line table ...
2011-08-25Merge branch 'dev' into majorHenrik Nord
2011-08-23fix supervisors restarting temporary childrenFred Hebert
In the current implementation of supervisors, temporary children should never be restarted. However, when a temporary child is restarted as part of a one_for_all or rest_for_one strategy where the failing process is not the temporary child, the supervisor still tries to restart it. Because the supervisor doesn't keep some of the MFA information of temporary children, this causes the supervisor to hit its restart limit and crash. This patch fixes the behaviour by inserting a clause in terminate_children/2-3 (private function) that will omit temporary children when building a list of killed processes, to avoid having the supervisor trying to restart them again. Only supervisors in need of restarting children used the list, so the change should be of no impact for the functions that called terminate_children/2-3 only to kill all children. The documentation has been modified to make this behaviour more explicit.
2011-08-18Fix a bug in zip:zip_open/1,2.Hans Bolinder
zip:zip_open/1,2 did not accept binary archives. Also corrected the contracts of t/1 and tt/1.
2011-08-18beam_lib: Retain the "Line" chunk when stripping BEAM filesBjörn Gustavsson
2011-08-17Correct contracts in the zip moduleHans Bolinder
The contracts of zip:zip_list_dir/1 and zip:zip_get/2 have been corrected.
2011-08-16compiler: Don't create filenames starting with "./"Björn Gustavsson
In the location information tables in the run-time system, source filenames that are the same as the module name plus ".erl" extension are not stored explicitly, thus saving memory. To take advantage of that optimization, avoid complicating the names of files in the current working directory; specifically, make sure that "./" is not prepended to the name.
2011-08-16emulator: Add a fourth element in exception stacktracesBjörn Gustavsson
This commit is a preparation for introducing location information (filename/line number) in stacktraces in exceptions. Currently a stack trace looks like: [{Mod1,Function1,Arity1}, . . . {ModN,FunctionN,ArityN}] Add a forth element to each tuple that can be used indication the filename and line number of the source file: [{Mod1,Function1,Arity1,Location1}, . . . {ModN,FunctionN,ArityN,LocationN}] In this commit, the fourth element will just be an empty list, and we will change all code that look at or manipulate stacktraces.
2011-08-16Fix binary matching in the debuggerBjörn Gustavsson
'eval_bits' is a common utility module used for evaluting binary construction and matching. The functions that do matching (match_bits/{6,7} and bin_gen/6) are supposed to treat the bindings as an abstract data type, but they assume that the bindings have the same representation as in the erl_eval module. That may cause binary matching to fail in the debugger, because the debugger represents the bindings as an unordered list of two-tuples, while the erl_eval modules uses an ordered list of two-tuple (an ordset). One way to fix the problem would be to let the debugger to use ordered lists to represent the bindings. Unfortunately, that would also change how the bindings are presented in the user interface. Currently, the variable have most been recently assigned is shown first, which is convenient. Fix the matching problem by mending the leaky abstraction in eval_bits. The matching functions needs to be passed two additional operations: one for looking up a variable in the bindings and one for adding a binding. Those operations could be passed as two more funs (in addition to the evaluation and match fun already passed), but the functions already have too many arguments. Therefore, change the meaning of the match fun, so that the first argument is the operation to perform ('match', 'binding', or 'add_binding') and second argument is a tuple with arguments for the operation.
2011-08-15Correct the contract of timer:now_diff/2Hans Bolinder
The contract of timer:now_diff() has been corrected. (Thanks to Alex Morarash).
2011-08-01Remove all modules relating to drivers and make all functions obsolete.Lukas Larsson
2011-07-22Merge branch 'dev' into majorRaimo Niskanen
2011-07-21Code cleanup, unduplicate test for whitespaceRaimo Niskanen
2011-07-21EOF before first field is only ok for first character in io:freadRaimo Niskanen
2011-07-21At end of input ask for more also for for literal format charactersRaimo Niskanen
2011-07-07Merge branch 'dev' into majorHans Bolinder
* dev: Modify the contracts of the queue module
2011-07-07Merge branch 'hb/stdlib/queue_contracts/OTP-9418' into devHans Bolinder
* hb/stdlib/queue_contracts/OTP-9418: Modify the contracts of the queue module
2011-07-07Merge branch 'bjorn/remove-concat-binary/OTP-9421' into majorBjörn Gustavsson
* bjorn/remove-concat-binary/OTP-9421: Update preloaded modules Remove deprecated concat_binary/1
2011-07-07Merge branch 'dev' into majorHans Bolinder
* dev: Fix a bug in erl_scan:set_attribute/3
2011-07-07Modify the contracts of the queue moduleHans Bolinder
The contracts of the queue module have been re-written as to avoid some issues concerning Dialyzer and opaque types.
2011-07-06Fix a bug in erl_scan:set_attribute/3Hans Bolinder
2011-07-06Remove deprecated concat_binary/1Björn Gustavsson
concat_binary/1 was deprecated in R13B04, but already in the R10B-2 release, the documentation recommends using list_to_binary/1 instead.
2011-07-06Merge branch 'dev' into majorHans Bolinder
* dev: Correct the contract of io_lib:fread/2,3
2011-07-05Correct the contract of io_lib:fread/2,3Hans Bolinder
2011-06-21Merge branch 'dev' into majorPatrik Nyblom
2011-06-20Add more specs and typesHans Bolinder
An incorrect spec, rpc:yield/1, has been fixed.
2011-06-17Handle exit reason {shutdown,Term} as shutdown for children of supervisorSiri Hansen
In R13B proc_lib, gen_server and gen_fsm were all changed to handle exit reason {shutdown,Term} in the same way as exit reason 'shutdown', i.e. no crash reports are generated. This is an update of supervisor to do the same, i.e. handle these two exit reasons in the same way. This means that for children with restart type 'transient' there will be no attempt to restart the process if it terminates with reason {shutdown,Term}, and there will be no supervisor report.
2011-06-14Allow erl_tar to create directories inside directory with no read accessSiri Hansen
erl_tar:extract earlier failed when unpacking inside a directory which had some parent directory to which the user had no read access. This is corrected.
2011-05-24Add a proplist() typerzezeski
Recently I was adding specs to an API and found that there is no canonical proplist() type defined.
2011-05-23Fix a spec and a typeHans Bolinder
A specification that could cause problems for Dialyzer has been fixed. An opaque type in erl_eval has been turned in to a ordinary type. This is a temporary fix.
2011-05-18Fixup of re doc and specsPatrik Nyblom
2011-05-16OTP-9022: Fixed endode/decode of values of type Counter32.Micael Karlberg
OTP-9088: [agent] Added support for sending traps to IPv6 targets. OTP-9119: [agent] To be able to handle multiple engine-id(s) when sending trap(s), the function snmp_community_mib:add_community/6 has been added. OTP-9162: [manager] The API for snmp requests has been augmented to allow the caller to override some configuration. OTP-9174: [manager] The old API functions (for get and set requests) are now officially deprecated. OTP-9183: [agent] Pass extra info through the agent to the net-if process when sending notifications. OTP-9208: Added type specs for functions that do not return. Kostis Sagonas Merge branch 'bmk/snmp/snmp420_integration' into dev
2011-05-13Merge branch 'hb/stdlib/dets_tablenames/OTP-9282' into devHans Bolinder
* hb/stdlib/dets_tablenames/OTP-9282: Allow Dets tablenames to be arbitrary terms Conflicts: lib/stdlib/src/dets.erl
2011-05-12Types and specifications have been modified and addedHans Bolinder
2011-05-11Allow Dets tablenames to be arbitrary termsHans Bolinder
2011-05-04Change list to set in supervisor for saving pids of dynamic temprary childrenSiri Hansen
Since initial arguments of temporary children under simple_one_for_one supervisors are not saved, only a list of pids was stored in such supervisors. When adding/deleting many children, this would scale badly. To avoid this the list is now changed to a set.
2011-04-28Merge branch ↵Siri Hansen
'siri/stdlib/supervisor-terminate_child-simple_one_for_one/OTP-9201' into dev * siri/stdlib/supervisor-terminate_child-simple_one_for_one/OTP-9201: Add terminate_child(Sup, Pid) for simple_one_for_one Allow supervisor:terminate_child(SupRef,Pid) for simple_one_for_one
2011-04-28Merge branch 'km/pool_connect-to-running-nodes' into devHenrik Nord
* km/pool_connect-to-running-nodes: Change pool module to attempt to attach to nodes that are already running OTP-9244
2011-04-15Merge branch 'dev' into bmk/snmp/snmp420_integrationMicael Karlberg
2011-04-12Allow supervisor:terminate_child(SupRef,Pid) for simple_one_for_oneSiri Hansen
supervisor:terminate_child/2 was not allowed if the supervisor used restart strategy simple_one_for_one. This is now changed so that children of this type of supervisors can be terminated by specifying the child's Pid.
2011-04-12Merge branch 'gc/gen-format-status-improvements' into devHenrik Nord
* gc/gen-format-status-improvements: Fix format_status bug for unregistered gen_event processes Conflicts: lib/stdlib/test/gen_event_SUITE.erl OTP-9218
2011-04-08Merge branch 'dev' into bmk/snmp/snmp420_integrationMicael Karlberg
2011-04-04Completed bug fix "temporary child specs should not be kept when childIngela Anderton Andin
terminates" and improved test suite The bug fix supplied by Filipe David Manana <[email protected]> did not cover all possible ways that a process may be terminated as for instance with supervisor:terminate_child. Also there was a bug in the base case of the patch returning a list of a list instead of only the list. Added a timeout for the test cases, eliminated unnecessary sleeps, improved code.
2011-04-04Fix issue with temporary children introduced by OTP-9064Filipe David Manana
The temporary child specs are never removed from the supervisor's state, and have they're MFA component set to {M, F, undefined} instead of the MFA passed in the supervisor:start_child/2 call. Subsequent calls to supervisor:restart_child/2 may crash. Stack trace example: {badarg,[{erlang,apply,[gen_server,start_link,undefined]}, {supervisor,do_start_child,2},{supervisor,handle_call,3}, {gen_server,handle_msg,5}, {proc_lib,init_p_do_apply,3}]}
2011-03-31Deprecated old manager API (set and get) request functions.Micael Karlberg
2011-03-28Merge branch 'siri/stdlib/log_mf_h-write-index-atomically/OTP-9148' into devSiri Hansen
* siri/stdlib/log_mf_h-write-index-atomically/OTP-9148: Update index file atomically