aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2013-04-02add sys:get_state/1,2 and sys:replace_state/2,3Steve Vinoski
At Erlang Factory 2013 there was discussion during one of the talks about the sys:get_status functions and how useful they were for debugging. Geoff Cant mentioned it would be very useful if the sys module also provided functions to use while debugging to get just the state of a process and also to be able to replace the state of a process, and many others in the audience appeared to agree. The sys:get_state/1,2 functions return the state of a gen_server, gen_fsm, or gen_event process. The return value varies depending on the process type: process state for a gen_server, state name and state data for a gen_fsm, and handler module, handler id, and handler state for each handler registered in a gen_event process. The sys:replace_state/2,3 functions allow the state of a gen_server, gen_fsm, or gen_event process to be replaced with a new state. These functions take a function argument that updates or replaces the process state; using a function to change the state eliminates the race condition of first reading the state via sys:get_state/1 or sys:get_state/2, using its return value to create a new state, and then replacing the old state with the new state, since during that time the process might have received other calls or messages that could have changed its state. * For a gen_server process, the state replacement function takes the process state as an argument and returns a new state. * For a gen_fsm process, the state replacement function gets a tuple of {StateName, StateData} and returns a similar tuple that specifies a new state name, new state data, or both. * For a gen_event process, the state replacement function is called for each registered event handler. It gets a tuple {Module, Id, HandlerState} and returns a similar tuple that specifies the same Module and Id values but may specify a different value for HandlerState. If the state replacement function crashes or results in an error, the original state of a gen_server or gen_fsm process is maintained; if such a crash occurs for a gen_event process, the original state of the event handler for which the state replacement function was called is maintained, but the states of other event handlers of the same gen_event process may still be updated if no errors or crashes occur while replacing their states. Add documentation for sys:get_state/1,2 and sys:replace_state/2,3. The documentation explicitly notes that the functions are intended for use during debugging. Add new tests for these functions to gen_server_SUITE, gen_fsm_SUITE, and gen_event_SUITE.
2013-03-29update sys:get_status/2,3 documentation for gen_eventSteve Vinoski
Modify the documentation for the sys:get_status/2,3 functions to reflect that they also work on gen_event processes, and add a cross reference for gen_event:format_status/2 to go along with the existing cross references for gen_server and gen_fsm.
2013-03-28Merge branch 'sk/odbc64/OTP-10993' into maintFredrik Gustafsson
* sk/odbc64/OTP-10993: explain postgres pecularity for param query out parameters postgresql test case for 64bit bug for param_query rollback disabling scrollable_cursors for oracle drop procedure after testing set scrollable_cursors to off for oracle driver drop procedure after testing test case for stored procedure with (32bit) integer out params on 64bit platform odbcserver 64bit bug for SQL_C_SLONG type
2013-03-28Merge branch 'hm/reltool_relaxed_exclude' into maintSiri Hansen
OTP-10988 * hm/reltool_relaxed_exclude: [reltool] Add test case for missing application [reltool] Relax requirements on excluded applications
2013-03-27Merge branch 'anders/diameter/app_not_configured/OTP-10972' into maintAnders Svensson
* anders/diameter/app_not_configured/OTP-10972: Fix faulty sequence validation Add config suite Deal with config errors detected at transport start less brutally Move most transport_opt() validation into diameter_config Minor doc/spec fix Minor diameter_lib cleanup
2013-03-27Merge branch 'anders/diameter/examples_suite/OTP-10903' into maintAnders Svensson
* anders/diameter/examples_suite/OTP-10903: Compile example dictionaries against both RFC 3588 and 6733 Compile example dicts from the repo when running locally Documentation fixes Move example dict compilation to examples suite Add examples suite for testing example code Minor tweaks and fixes
2013-03-27explain postgres pecularity for param query out parametersRaimo Niskanen
2013-03-27postgresql test case for 64bit bug for param_querySatoshi Kinoshita
2013-03-27rollback disabling scrollable_cursors for oracleSatoshi Kinoshita
2013-03-27drop procedure after testingSatoshi Kinoshita
2013-03-27set scrollable_cursors to off for oracle driverSatoshi Kinoshita
2013-03-27drop procedure after testingSatoshi Kinoshita
2013-03-27test case for stored procedure with (32bit) integer out params on 64bit platformSatoshi Kinoshita
2013-03-27odbcserver 64bit bug for SQL_C_SLONG typeSatoshi Kinoshita
2013-03-27Merge branch 'siri/cover/hanging-proc/OTP-10979' into maintSiri Hansen
* siri/cover/hanging-proc/OTP-10979: [cover] Ensure no process leak when stopping cover on dead node
2013-03-27Merge branch 'ks/hipe-cleanup/OTP-10985' into maintFredrik Gustafsson
* ks/hipe-cleanup/OTP-10985: Fix handling of bs_match_string translation Take out 'constant' type test and unnecessary type declaration Take out 'constant' type test from left over comments Enable more warnings Use remote type instead of relying on hipe_icode.hrl Add type info for hipe_bifs:nstack_used_size/0 Use correct type name Update a comment
2013-03-27[reltool] Add test case for missing applicationSiri Hansen
2013-03-27[reltool] Relax requirements on excluded applicationsHåkan Mattsson
A missing application directory is now classified as a warning if the application is explicitly excluded.
2013-03-27Added testcases for ct_telnet and opportunity to connect to telnet without ↵Fredrik Gustafsson
user and password.
2013-03-27Merge branch 'nox/ssh/fix-ssh-html-doc/OTP-10983' into maintFredrik Gustafsson
* nox/ssh/fix-ssh-html-doc/OTP-10983: Properly ignore everything in lib/ssh/doc/html/
2013-03-26Fix faulty sequence validationAnders Svensson
The validation of {sequence, {H,N}} incorrectly checked that H was an N-bit integer, instead of the intended 32-N.
2013-03-26Add config suiteAnders Svensson
To verify return values from diameter:start_service/2 and diameter:add_transport/2 when passing various config.
2013-03-26Deal with config errors detected at transport start less brutallyAnders Svensson
Crashing watchdog and peer_fsm processes was somewhat unseemly. Emit an error report and die silently instead.
2013-03-26Move most transport_opt() validation into diameter_configAnders Svensson
Faulty configuration was previously passed directly on to watchdog and peer_fsm processes, diameter:add_transport/2 happily returning ok and the error resulting on failure of watchdog and/or peer_fsm processes. Now check for errors before getting this far, returning {error, Reason} from diameter:add_transport/2 when one is detected. There are still some errors that can only be detected after transport start (eg. a misbehaving callback) but most will be caught early.
2013-03-26Minor doc/spec fixAnders Svensson
'infinity' is a valid transport_config timeout.
2013-03-26Merge branch 'vk/fix_ssl_connection/OTP-10980' into maintFredrik Gustafsson
* vk/fix_ssl_connection/OTP-10980: Added comment about proxy certificates Fix ssl_connection to support reading proxy/chain certificates
2013-03-26[cover] Ensure no process leak when stopping cover on dead nodeSiri Hansen
When cover:stop(Node) was called on a non-existing node, a process waiting for cover data from the node would hang forever. This has been corrected.
2013-03-26Merge branch 'dgud/testcase_fixes' into maintDan Gudmundsson
* dgud/testcase_fixes: Fix timers mnesia: Decrease test times Add debug printouts wx: Fix failing testcases stdlib: Ignore symlink tests on windows
2013-03-25Minor diameter_lib cleanupAnders Svensson
Remove unused functions, add dialyzer specs, make wait/1 less fallible.
2013-03-25Merge branch 'maint-r16' into maintLars Thorsen
* maint-r16: [orber] Fix bug in corbaloc/corbaname over ssl
2013-03-25Added comment about proxy certificatesFredrik Gustafsson
2013-03-24Compile example dictionaries against both RFC 3588 and 6733Anders Svensson
2013-03-24Compile example dicts from the repo when running locallyAnders Svensson
Instead of from the installation.
2013-03-24Documentation fixesAnders Svensson
Fix errors and omissions related to dictionary compilation.
2013-03-24Move example dict compilation to examples suiteAnders Svensson
From compiler suite.
2013-03-24Add examples suite for testing example codeAnders Svensson
That is, code installed under examples/code in an installation.
2013-03-24Minor tweaks and fixesAnders Svensson
Fix a broken include in example code, remove an inappropriate ct:pal/2 outside of a testcase, echo more info from test/Makefile.
2013-03-21Merge branch 'maint-r15' into lars/orber/corbaloc-bug-r16-version/OTP-10675Lars Thorsen
* maint-r15: [orber] Fix bug in corbaloc/corbaname over ssl
2013-03-21Fix ssl_connection to support reading proxy/chain certificatesValentin Kuznetsov
2013-03-19Merge branch 'bjorn/compiler/fix-slow-compilation/OTP-10939' into maintBjörn Gustavsson
* bjorn/compiler/fix-slow-compilation/OTP-10939: Fix slow compilation of complex guards
2013-03-19Fix slow compilation of complex guardsBjörn Gustavsson
beam_utils:is_not_used_at/3 could be very slow for complex guards, because the cached result for previously encountered labels were neither used nor updated within blocks. Reported-by: Magnus Müller
2013-03-19Merge branch 'bjorn/asn1/fix-latin1-issue' into maintBjörn Gustavsson
* bjorn/asn1/fix-latin1-issue: Eliminate latin1 encoded characters
2013-03-19Merge branch 'maint-r16' into maintAnders Svensson
2013-03-19Prepare releaseErlang/OTP
2013-03-19Merge branch 'anders/diameter/vendor_specific_app_id/OTP-10942' into maint-r16Anders Svensson
* anders/diameter/vendor_specific_app_id/OTP-10942: Minor capx suite fix Update appup, vsn -> 1.4.1.1 Deal with RFC 6733 change to Vendor-Specific-Application-Id
2013-03-19Merge branch 'anders/diameter/reopen_abuse/OTP-10898' into maint-r16Anders Svensson
* anders/diameter/reopen_abuse/OTP-10898: Update appup Tweak okay -> suspect config Add testcases for watchdog_config Rework watchdog suite to remove most timing dependencies Rework stats to avoid concurrent read and write Minor spec fix Add transport_opt() watchdog_config
2013-03-19Prepare releaseErlang/OTP
2013-03-19Let escript recognize an encoding comment on the second lineHans Bolinder
The manual says that an Emacs directive can be placed on the second line. With this patch that directive is also recognized when selecting encoding of the script.
2013-03-19Merge branch 'ia/inets/cookie-bug/OTP-10956' into maintIngela Anderton Andin
* ia/inets/cookie-bug/OTP-10956: inets httpc: Revert incorrect commit regarding cookie handling.
2013-03-19Merge branch 'jb/ssl/fix-ssl-npn-doc/OTP-10955' into maintFredrik Gustafsson
* jb/ssl/fix-ssl-npn-doc/OTP-10955: Fix SSL Next Protocol Negotiation documentation