diff options
Diffstat (limited to 'meta/recipes-devtools/tcltk8/tcl8/interp.patch')
-rw-r--r-- | meta/recipes-devtools/tcltk8/tcl8/interp.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/tcltk8/tcl8/interp.patch b/meta/recipes-devtools/tcltk8/tcl8/interp.patch new file mode 100644 index 0000000000..aeebb038e3 --- /dev/null +++ b/meta/recipes-devtools/tcltk8/tcl8/interp.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 09049beed723243d092ffaa37939dfe0f2ed6828 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@arm.com> | ||
3 | Date: Mon, 12 Jul 2021 14:50:13 +0100 | ||
4 | Subject: [PATCH] tcl: fix race in interp.test | ||
5 | |||
6 | The interp-36.7 patch has race conditions and is missing cleanup. This patch by | ||
7 | a Tcl maintainer should improve matters. | ||
8 | |||
9 | Upstream-Status: Inappropriate [tcl 8.x is obsolete; upstream submission should be for 9.x patches] | ||
10 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
11 | --- | ||
12 | tests/interp.test | 7 ++++--- | ||
13 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/tests/interp.test b/tests/interp.test | ||
16 | index 24ffb1b..c6460ad 100644 | ||
17 | --- a/tests/interp.test | ||
18 | +++ b/tests/interp.test | ||
19 | @@ -3614,17 +3614,18 @@ test interp-36.7 {ChildBgerror sets error handler of child [1999035]} -setup { | ||
20 | variable result | ||
21 | set result [lindex $args 0] | ||
22 | } | ||
23 | + set tout [after 5000 {set result timeout}] | ||
24 | } -body { | ||
25 | child eval { | ||
26 | variable done {} | ||
27 | after 0 error foo | ||
28 | - after 10 [list ::set [namespace which -variable done] {}] | ||
29 | - vwait [namespace which -variable done] | ||
30 | } | ||
31 | + vwait result | ||
32 | set result | ||
33 | } -cleanup { | ||
34 | + after cancel $tout | ||
35 | variable result {} | ||
36 | - unset -nocomplain result | ||
37 | + unset -nocomplain result tout | ||
38 | interp delete child | ||
39 | } -result foo | ||
40 | |||