<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/stdlib/test/Makefile, branch erl_1271</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Fix rest_for_one and one_for_all restarting a child not terminated</title>
<updated>2013-04-04T11:22:11+00:00</updated>
<author>
<name>James Fish</name>
<email>james@fishcakez.com</email>
</author>
<published>2013-04-04T00:59:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c59c3a6d57b857913ddfa13f96425ba0d95ccb2d'/>
<id>c59c3a6d57b857913ddfa13f96425ba0d95ccb2d</id>
<content type='text'>
In rest_for_one and one_for_all supervisors one child dying can cause
multiple children to be restarted. Previously if the child that caused
the restart is started successfully but another child fails to start,
the supervisor would not terminate this child with the other
successfully restarted children as no record of the pid was kept. Thus
the supervisor would try to start this child again. This could lead to
multiples of the same child or if the child is registered cause repeated
attempts at starting this child - until the max restart threshold was
reached.

Now the child that failed to start becomes the restarting child, instead
of staying with the same child, for the next restart attempt. This has
the following side effects:

1) In one_for_all the new version of the child that original died is
   terminated before a restart attempt is made.

2) In rest_for_one all succesfully restarted children are not terminated
   and restarting continues from the child that failed to start.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In rest_for_one and one_for_all supervisors one child dying can cause
multiple children to be restarted. Previously if the child that caused
the restart is started successfully but another child fails to start,
the supervisor would not terminate this child with the other
successfully restarted children as no record of the pid was kept. Thus
the supervisor would try to start this child again. This could lead to
multiples of the same child or if the child is registered cause repeated
attempts at starting this child - until the max restart threshold was
reached.

Now the child that failed to start becomes the restarting child, instead
of staying with the same child, for the next restart attempt. This has
the following side effects:

1) In one_for_all the new version of the child that original died is
   terminated before a restart attempt is made.

2) In rest_for_one all succesfully restarted children are not terminated
   and restarting continues from the child that failed to start.
</pre>
</div>
</content>
</entry>
<entry>
<title>erl_eval: Don't test parameterized modules</title>
<updated>2013-01-10T06:45:07+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2012-11-07T15:30:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=94ca384fe91708d6e750a1c9ac32dedcb9ad16a9'/>
<id>94ca384fe91708d6e750a1c9ac32dedcb9ad16a9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to work with whitespace in exec path</title>
<updated>2012-06-05T08:52:16+00:00</updated>
<author>
<name>Lukas Larsson</name>
<email>lukas@erlang-solutions.com</email>
</author>
<published>2012-05-30T16:45:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=5f8867fb985b2b899e2ba8391652c7111f9df9bb'/>
<id>5f8867fb985b2b899e2ba8391652c7111f9df9bb</id>
<content type='text'>
OTP-10106
OTP-10107
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OTP-10106
OTP-10107
</pre>
</div>
</content>
</entry>
<entry>
<title>Leave control back to gen_server during supervisor's restart loop</title>
<updated>2012-03-05T10:22:13+00:00</updated>
<author>
<name>Siri Hansen</name>
<email>siri@erlang.org</email>
</author>
<published>2011-12-15T10:57:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=e6e31791abf090fe7e0bd3e5970b44830d087c4a'/>
<id>e6e31791abf090fe7e0bd3e5970b44830d087c4a</id>
<content type='text'>
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'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add plugin support for alternative name lookup</title>
<updated>2011-11-24T08:36:13+00:00</updated>
<author>
<name>Ulf Wiger</name>
<email>ulf.wiger@erlang-solutions.com</email>
</author>
<published>2011-01-17T14:47:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=b0426732cc19598f0c0c310b1e79918252495259'/>
<id>b0426732cc19598f0c0c310b1e79918252495259</id>
<content type='text'>
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) -&gt; yes | no
whereis_name(Name)  -&gt; pid() | undefined
unregister_name(Name) -&gt; ok
send(Name, Msg) -&gt; 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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) -&gt; yes | no
whereis_name(Name)  -&gt; pid() | undefined
unregister_name(Name) -&gt; ok
send(Name, Msg) -&gt; 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Explicitly kill dynamic children in supervisors</title>
<updated>2011-09-16T12:54:44+00:00</updated>
<author>
<name>Christopher Faulet</name>
<email>christopher@yakaz.com</email>
</author>
<published>2011-09-05T10:42:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=47759479146ca11ad81eca0bb3236b265e20601d'/>
<id>47759479146ca11ad81eca0bb3236b265e20601d</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'hw/call-chmod-without-f' into dev</title>
<updated>2011-03-30T15:35:10+00:00</updated>
<author>
<name>Henrik Nord</name>
<email>henrik@erlang.org</email>
</author>
<published>2011-03-30T15:28:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=033469177c0337ce0dfde3a5a6478179389ba8c0'/>
<id>033469177c0337ce0dfde3a5a6478179389ba8c0</id>
<content type='text'>
* hw/call-chmod-without-f:
  Call chmod without the "-f" flag

Conflicts:
	erts/emulator/test/Makefile
	lib/asn1/test/Makefile
	lib/crypto/test/Makefile
	lib/debugger/test/Makefile
	lib/docbuilder/test/Makefile
	lib/edoc/test/Makefile
	lib/erl_interface/test/Makefile
	lib/inviso/test/Makefile
	lib/parsetools/test/Makefile
	lib/percept/test/Makefile
	lib/ssl/test/Makefile
	lib/syntax_tools/test/Makefile
	lib/test_server/test/Makefile
	lib/tools/test/Makefile

OTP-9170
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* hw/call-chmod-without-f:
  Call chmod without the "-f" flag

Conflicts:
	erts/emulator/test/Makefile
	lib/asn1/test/Makefile
	lib/crypto/test/Makefile
	lib/debugger/test/Makefile
	lib/docbuilder/test/Makefile
	lib/edoc/test/Makefile
	lib/erl_interface/test/Makefile
	lib/inviso/test/Makefile
	lib/parsetools/test/Makefile
	lib/percept/test/Makefile
	lib/ssl/test/Makefile
	lib/syntax_tools/test/Makefile
	lib/test_server/test/Makefile
	lib/tools/test/Makefile

OTP-9170
</pre>
</div>
</content>
</entry>
<entry>
<title>Update and add cover spec files to work with common_test</title>
<updated>2011-02-17T16:39:00+00:00</updated>
<author>
<name>Lukas Larsson</name>
<email>lukas@erix.ericsson.se</email>
</author>
<published>2011-01-12T13:56:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=cfa01c9bd748df38750dc4841030e6520610538a'/>
<id>cfa01c9bd748df38750dc4841030e6520610538a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Call chmod without the "-f" flag</title>
<updated>2010-11-15T11:05:16+00:00</updated>
<author>
<name>Holger Weiß</name>
<email>holger@zedat.fu-berlin.de</email>
</author>
<published>2010-11-15T11:05:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=7ed11a886fc8fcaf3c2b8324294e2f24e02b0f28'/>
<id>7ed11a886fc8fcaf3c2b8324294e2f24e02b0f28</id>
<content type='text'>
"-f" is a non-standard chmod option which at least SGI IRIX and HP UX do
not support. As the only effect of the "-f" flag is to suppress warning
messages, it can be safely omitted.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"-f" is a non-standard chmod option which at least SGI IRIX and HP UX do
not support. As the only effect of the "-f" flag is to suppress warning
messages, it can be safely omitted.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add random compare testcase</title>
<updated>2010-05-17T13:51:49+00:00</updated>
<author>
<name>Patrik Nyblom</name>
<email>pan@erlang.org</email>
</author>
<published>2010-04-20T15:32:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=f06f499690ef1f5c8659128095a82d6c9b834d68'/>
<id>f06f499690ef1f5c8659128095a82d6c9b834d68</id>
<content type='text'>
Fix heap-hole when trapping in binary.c
Fix boyer more segfaulting when searchstring is longer than haystack
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix heap-hole when trapping in binary.c
Fix boyer more segfaulting when searchstring is longer than haystack
</pre>
</div>
</content>
</entry>
</feed>
