blob: 5fc4ebd1246f79d1288edfe7063b70c8fdac84ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
Origin: http://www.zsh.org/mla/workers/2014/msg01250.html
http://www.zsh.org/mla/workers/2015/msg02205.html
Author: Bart Schaefer <schaefer@brasslantern.com>
Bug-Debian: https://bugs.debian.org/759870
Description: Add a sleep call which should prevent a race condition in coproc
Index: zsh/Test/A05execution.ztst
===================================================================
--- zsh.orig/Test/A05execution.ztst 2015-08-26 23:00:54.942370669 +0200
+++ zsh/Test/A05execution.ztst 2015-08-26 23:09:35.562131142 +0200
@@ -207,7 +207,8 @@
coproc { read -et 5 || { print -u $ZTST_fd KILLED; kill -HUP -$$ } }
print -u $ZTST_fd 'This test takes 5 seconds to fail...'
{ printf "%d\n" {1..20000} } | ( read -e )
- hang(){ printf "%d\n" {2..20000} | cat }; hang | ( read -e )
+ hang(){ printf "%d\n" {2..20000} | cat }; hang 2>/dev/null | ( read -e )
+ sleep 1 ;: avoid coproc exit race condition
print -p done
read -et 6 -p
0:Bug regression: piping a shell construct to an external process may hang
|