summaryrefslogtreecommitdiff
path: root/lib/stdlib/doc/src/supervisor.xml
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright yearRickard Green2021-12-131-1/+1
|
* Fix typoMaria-126484302021-04-191-1/+1
|
* Update lib/stdlib/doc/src/supervisor.xmlMaria Scott2021-04-151-2/+1
| | | Co-authored-by: Lukas Larsson <garazdawi@gmail.com>
* Improve docs for supervisor auto-shutdownMaria-126484302021-04-151-4/+9
|
* Add more sections to supervisor introductionLukas Larsson2021-04-141-3/+15
|
* Docs for supervisor auto-shutdownMaria-126484302021-04-141-0/+61
|
* Extend supervisor docs for EEP 56juhlig2021-04-141-9/+17
|
* Typo fix in supervisor.xmlRaj Shah2020-10-181-1/+1
|
* otp: Move funcs description into funcs_description tagLukas Larsson2020-03-271-5/+6
|
* otp: Convert all <seealso> to more specific variantsLukas Larsson2020-03-271-41/+41
| | | | | | | | | | | | We add `seemfa`, `seeerl`, `seetype`, `seeapp`, `seecom`, `seecref` , `seefile` and `seeguide` in order to make it easier to reason about what each link points to without examining the target. This information will then be embedded in the EEP-48 chunks for usage by other tools. The tool used can be found here: https://gist.github.com/garazdawi/68527d92ae5b37c8f129bfbdfffdfa68
* stdlib: Export types from supervisorHans Bolinder2019-11-181-1/+13
| | | | See also PR-1767.
* Add empty 'since' attribute for old modules and functionsSverker Eriksson2018-12-121-10/+10
|
* Add "since" attributes in xml for new functions and modulesSverker Eriksson2018-12-111-2/+2
| | | | introduced after OTP_R13B03.
* Update copyright yearHenrik Nord2018-09-211-1/+1
|
* [supervisor] Add warning about race conditionSiri Hansen2018-09-071-2/+10
| | | | | | | | | | | | ERL-724: "During a 'gentle' shutdown, supervisors unlink from their children before sending shutdown signals to them. This can lead to a race condition in supervision trees, when the timeout for gentle shutdown of a parent supervisor expires and it kills a child supervisor that has just unlinked from a child of its own, leaving the child supervisor's own child still running after its supervisor is killed." This commit adds a warning about this in the documentation.
* Update copyright yearRaimo Niskanen2017-05-041-1/+1
|
* stdlib: Deprecate gen_fsmIngela Anderton Andin2017-04-271-4/+2
|
* Expand on the behavior of supervisorsBrujo Benavides2016-11-151-2/+4
| | | | | | Add additional details on the behavior of supervisors when reaching maximum restart intensity, as stated by @rvirding at [Medium](https://goo.gl/XhwpSL)
* Update STDLIB documentationBjörn Gustavsson2016-06-131-356/+424
| | | | | | Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Björn Gustavsson and Hans Bolinder.
* Merge branch 'raimo/new-gen-state-machine/OTP-13065'Raimo Niskanen2016-04-251-3/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * raimo/new-gen-state-machine/OTP-13065: (52 commits) Add section on state filtering Promote gen_statem over gen_fsm Modify code_change/4 to return CallbackMode Use ?NAME macro in examples Introduce Fred Herbert suggested additions Introduce corrections from Fred Hebert and Ingela Use .png pictures instead of .gif Write Design Principles chapter Fix missing short forms for event timeout Do more intricate Fred Hebert doc changes Change Caller -> From as suggested by Fred Hebert Do documentation improvements from Fred Hebert Fix broken documenation reference Rename state_timeout -> event_timeout Fix most of the system docs and emacs mode Change code_change/4 to {ok,State,Data} Fixup sharpened test suite Sharpen test suite Remove the remove_event action and all alike Relax caller() type check and cleanup ... Conflicts: lib/stdlib/src/gen.erl lib/stdlib/src/gen_event.erl lib/stdlib/src/gen_fsm.erl lib/stdlib/src/gen_server.erl lib/stdlib/test/error_logger_forwarder.erl
| * Fix most of the system docs and emacs modeRaimo Niskanen2016-03-031-4/+6
| |
* | update copyright-yearHenrik Nord2016-03-151-1/+1
| |
* | Speed up supervisor:count_children/1; simple_one_for_oneRory Byrne2016-02-031-1/+4
|/ | | | | | | | | | | | | | | | | Speed up supervisor:count_children/1 for simple_one_for_one supervisors. This is achieved by avoiding looping through all the child process and verifying that each one is alive. For a supervisor with 100,000 'temporary' children the count-time will drop from approx 25ms to about 0.005ms. For a supervisor with 100,000 'permanent' or 'transient' children the count-time will drop from approx 30ms to about 0.005ms. This avoids having the supervisor block for an extended period while the count takes place. Under normal circumstances the accuracy of the result should also improve since the duration is too short for many processes to die during the count.
* [stdlib] Correct documentationHans Bolinder2015-11-041-1/+1
| | | | Fix mistakes found by 'xmllint'.
* Change license text to APLv2Bruce Yinhe2015-06-181-9/+10
|
* Don't store child that returns ignore in simple supervisorJames Fish2015-05-261-3/+9
| | | | | | | | | | | | | | | If a child of a simple_one_for_one returns ignore from its start function no longer store the child for any restart type. It is not possible to restart or delete the child because the supervisor is a simple_one_for_one. Previously a simple_one_for_one would crash, potentially without shutting down all of its children, when it tried to shutdown a child with undefined pid. Previous only one undefined pid child was stored in a simple_one_for_one supervisor no matter how many times the child start function returned ignore.
* Add documentation of maps in supervisor flags and child specsSiri Hansen2014-11-061-94/+161
|
* stdlib: Improve the doc of the supervisor's via referenceHans Bolinder2014-03-051-3/+3
| | | | | | | | Most of the updates have already been made in 'Fix alternative registry type annotations in supervisor', a5412706f4185fddbac29216a49affd1e9f11da0. Thanks to MaximMinin.
* Merge branch 'maint'Fredrik Gustafsson2013-07-111-1/+1
|\
| * Fix supervisor typogoofansu2013-07-111-1/+1
| | | | | | | | `I` should be `If`
| * Update copyright yearsBjörn-Egil Dahlberg2013-06-121-1/+1
| |
* | Convert XML files to UTF-8Hans Bolinder2013-04-191-2/+2
|/
* Delete obsolete note about simple-one-for-one supervisorMagnus Henoch2013-03-081-6/+0
| | | | | | | | Since commit 47759479146ca11ad81eca0bb3236b265e20601d, simple-one-for-one supervisors _do_ kill their children explicitly on shutdown. That commit also removed this note, but it seems like the merge commit 45b4d5309e0686cc5fa28506de76f75b598bbd95 incorrectly reinstated it.
* Fix documentation about how supervisor handles crash in child's start functionSiri Hansen2012-10-111-4/+4
|
* Have supervisor send errors up the chainTomas Pihl2012-10-051-1/+1
| | | | | | If a child fails to start, supervisor relies upon error_logger which does not work when IO is inhibited. Instead pass the error up the chain and let someone else use a proper Reason for any possible printouts.
* Update copyright yearsBjörn-Egil Dahlberg2012-03-301-1/+1
|
* Merge branch 'rj/fix-supervisor-shutdown-doc' into maintGustav Simonsson2012-03-161-7/+13
|\ | | | | | | | | | | | | | | | | | | | | * rj/fix-supervisor-shutdown-doc: Fix small typo in kernel app doc Cosmetic: split very long lines from supervisor doc Fix supervisor doc: Shutdown, MaxR and MaxT type specs Add the type restrictions in the code comments Remove trailing spaces OTP-9987
| * Cosmetic: split very long lines from supervisor docRicardo Catalinas Jiménez2012-02-241-5/+10
| |
| * Fix supervisor doc: Shutdown, MaxR and MaxT type specsRicardo Catalinas Jiménez2012-02-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The next code snippets from supervisor.erl show that Shutdown from a child specification must be greater than zero and the same applies to MaxT. --- supervisor.erl ---------------------------------------------------------- validShutdown(Shutdown, _) when is_integer(Shutdown), Shutdown > 0 -> true; validShutdown(infinity, _) -> true; validShutdown(brutal_kill, _) -> true; validShutdown(Shutdown, _) -> throw({invalid_shutdown, Shutdown}). validIntensity(Max) when is_integer(Max), Max >= 0 -> true; validIntensity(What) -> throw({invalid_intensity, What}). validPeriod(Period) when is_integer(Period), Period > 0 -> true; validPeriod(What) -> throw({invalid_period, What}). -----------------------------------------------------------------------------
* | Leave control back to gen_server during supervisor's restart loopSiri Hansen2012-03-051-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an attempt to restart a child failed, supervisor would earlier keep the execution flow and try to restart the child over and over again until it either succeeded or the restart frequency limit was reached. If none of these happened, supervisor would hang forever in this loop. This commit adds a timer of 0 ms where the control is left back to the gen_server which implements the supervisor. This way any incoming request to the supervisor will be handled - which could help breaking the infinite loop - e.g. shutdown request for the supervisor or for the problematic child. This introduces some incompatibilities in stdlib due to new return values from supervisor: * restart_child/2 can now return {error,restarting} * delete_child/2 can now return {error,restarting} * which_children/1 returns a list of {Id,Child,Type,Mods}, where Child, in addition to the old pid() or 'undefined', now also can be 'restarting'.
* | Merge branch 'uw/extending_gen' into maintGustav Simonsson2012-02-241-2/+10
|\ \ | |/ |/| | | | | | | | | * uw/extending_gen: Add plugin support for alternative name lookup OTP-9945
| * Add plugin support for alternative name lookupUlf Wiger2011-11-241-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OTP behaviour instances (gen_server, gen_fsm, gen_event) can currently register themselves either locally or globally, and the behaviour libraries (including gen.erl) support both addressing methods, as well as the normal Pid and {Name, Node}. However, there are alternative registry implementations - e.g. gproc - and one can well imagine other ways of locating a behaviour instance, e.g. on a node connected only via a TCP tunnel, rather than via Distributed Erlang. In all these cases, one needs to write extra code to identify the behaviour instance, even though the instance itself need not be aware of how it is located. This patch introduces a new way of locating a behaviour instance: {via, Module, Name}. Module is expected to export a subset of the functions in global.erl, namely: register_name(Name, Pid) -> yes | no whereis_name(Name) -> pid() | undefined unregister_name(Name) -> ok send(Name, Msg) -> Pid Semantics are expected to be the same as for global.erl This can be used in all places where {global, Name} is accepted. faulty export in gen_fsm_SUITE.erl await process death in dummy_via:reset() fix error in gen_[server|fsm]:enter_loop() fix documentation
* | Don't save child spec for temporary child if child's start func returns ignoreSiri Hansen2011-12-201-10/+3
|/ | | | Supervisor should never keep child specs for dead temporary children.
* Improve documentation on supervisor restart strategySiri Hansen2011-11-161-22/+39
|
* Merge branch 'cf/simple_one_for_one_shutdown'Henrik Nord2011-10-201-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | * cf/simple_one_for_one_shutdown: Explain how dynamic child processes are stopped Stack errors when dynamic children are stopped Explicitly kill dynamic children in supervisors Conflicts: lib/stdlib/doc/src/supervisor.xml OTP-9647
| * Explain how dynamic child processes are stoppedChristopher Faulet2011-09-161-0/+4
| |
| * Explicitly kill dynamic children in supervisorsChristopher Faulet2011-09-161-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the supervisor's documentation: "Important note on simple-one-for-one supervisors: The dynamically created child processes of a simple-one-for-one supervisor are not explicitly killed, regardless of shutdown strategy, but are expected to terminate when the supervisor does (that is, when an exit signal from the parent process is received)." All is fine as long as we stop simple_one_for_one supervisor manually. Dynamic children catch the exit signal from the supervisor and leave. But, if this happens when we stop an application, after the top supervisor has stopped, the application master kills all remaining processes associated to this application. So, dynamic children that trap exit signals can be killed during their cleanup (here we mean inside terminate/2). This is unpredictable and highly time-dependent. In this commit, supervisor module is patched to explicitly terminate dynamic children accordingly to the shutdown strategy. NOTE: Order in which dynamic children are stopped is not defined. In fact, this is "almost" done at the same time.
* | Add a warning to docs about workers' shutdown strategyChristopher Faulet2011-10-101-0/+7
| |
* | Allow an infinite timeout to shutdown worker processesChristopher Faulet2011-10-101-1/+2
| | | | | | | | | | | | | | Now, in child specification, the shutdown value can also be set to infinity for worker children. This restriction was removed because this is not always possible to predict the shutdown time for a worker. This is highly application-dependent.
* | Correct XML filesHans Bolinder2011-09-261-1/+0
|/