diff options
author | Hans Bolinder <[email protected]> | 2016-09-29 08:29:11 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2016-09-29 08:29:11 +0200 |
commit | 2b1d54c48ea4e72876e02b1380553105138c842c (patch) | |
tree | b941c6e48de40333f8c221fd061c629bf07b203b | |
parent | c0d124562fb4de88e823513df025647d0f6c41fd (diff) | |
parent | 8bde09c998c68265361155aa8ed188aa0e2a4a44 (diff) | |
download | otp-2b1d54c48ea4e72876e02b1380553105138c842c.tar.gz otp-2b1d54c48ea4e72876e02b1380553105138c842c.tar.bz2 otp-2b1d54c48ea4e72876e02b1380553105138c842c.zip |
Merge branch 'maint'
* maint:
parsetools: Correct handling of Unicode in Leex
Don't report error for shutdown exit tuple
-rw-r--r-- | lib/parsetools/src/leex.erl | 4 | ||||
-rw-r--r-- | lib/parsetools/test/leex_SUITE.erl | 8 | ||||
-rw-r--r-- | lib/stdlib/src/supervisor.erl | 4 |
3 files changed, 11 insertions, 5 deletions
diff --git a/lib/parsetools/src/leex.erl b/lib/parsetools/src/leex.erl index 15d42a4d9c..602e47404d 100644 --- a/lib/parsetools/src/leex.erl +++ b/lib/parsetools/src/leex.erl @@ -1586,6 +1586,8 @@ out_dfa_graph(St, DFA, DF) -> case file:open(St#leex.gfile, [write]) of {ok,Gfile} -> try + %% Set the same encoding as infile: + set_encoding(St, Gfile), io:fwrite(Gfile, "digraph DFA {~n", []), out_dfa_states(Gfile, DFA, DF), out_dfa_edges(Gfile, DFA), @@ -1621,7 +1623,7 @@ out_dfa_edges(File, DFA) -> foreach(fun (T) -> Crs = orddict:fetch(T, Tdict), Edgelab = dfa_edgelabel(Crs), - io:fwrite(File, " ~b -> ~b [label=\"~s\"];~n", + io:fwrite(File, " ~b -> ~b [label=\"~ts\"];~n", [S,T,Edgelab]) end, sort(orddict:fetch_keys(Tdict))) end, DFA). diff --git a/lib/parsetools/test/leex_SUITE.erl b/lib/parsetools/test/leex_SUITE.erl index 949ef3c36e..84f9c996ac 100644 --- a/lib/parsetools/test/leex_SUITE.erl +++ b/lib/parsetools/test/leex_SUITE.erl @@ -408,12 +408,12 @@ unicode(Config) when is_list(Config) -> Ts = [{unicode_1, <<"%% -*- coding: utf-8 -*-\n" "Definitions.\n" - "RTLarrow = (←)\n" + "RTLarrow = (â)\n" "Rules.\n" - "{RTLarrow} : {token,{'<-',TokenLine}}.\n" + "{RTLarrow} : {token,{\"â\",TokenLine}}.\n" "Erlang code.\n" "-export([t/0]).\n" - "t() -> {ok, [{'<-', 1}], 1} = string(\"←\"), ok.">>, + "t() -> {ok, [{\"â\", 1}], 1} = string(\"â\"), ok.">>, default, ok}], @@ -1137,7 +1137,7 @@ run_test(Config, Def, Pre) -> XrlFile = filename:join(DataDir, DefFile), ErlFile = filename:join(DataDir, Filename), Opts = [return, warn_unused_vars,{outdir,DataDir}], - ok = file:write_file(XrlFile, Def, [{encoding, unicode}]), + ok = file:write_file(XrlFile, Def), LOpts = [return, {report, false} | case Pre of default -> diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl index c81e72689c..1cd65fbf18 100644 --- a/lib/stdlib/src/supervisor.erl +++ b/lib/stdlib/src/supervisor.erl @@ -1087,6 +1087,10 @@ wait_dynamic_children(#child{restart_type=RType} = Child, Pids, Sz, wait_dynamic_children(Child, ?SETS:del_element(Pid, Pids), Sz-1, TRef, EStack); + {'DOWN', _MRef, process, Pid, {shutdown, _}} -> + wait_dynamic_children(Child, ?SETS:del_element(Pid, Pids), Sz-1, + TRef, EStack); + {'DOWN', _MRef, process, Pid, normal} when RType =/= permanent -> wait_dynamic_children(Child, ?SETS:del_element(Pid, Pids), Sz-1, TRef, EStack); |