[-- Attachment #1: Type: text/plain, Size: 980 bytes --] Hi, We are porting zsh 5.5.1 in AIX. As part of the build, we are running internal test suites by invoking "make check". We are experiencing a hang issue with one of the testcase named " A04redirect.ztst" . Below is the console output (with verbose set to 2 ). ZTST_test: looking for new test ZTST_test: examining line: ZTST_test: examining line: fn() { local foo; read foo; print $foo; } ZTST_getchunk: read code chunk: fn() { local foo; read foo; print $foo; } coproc fn print test output >&p read bar <&p print $bar ZTST_test: examining line: >test output ZTST_getredir: read redir for '>': test output test output ZTST_test: examining line: Running test: '>&p' and '<&p' redirection ZTST_test: expecting status: 0 Input: /tmp/zsh.ztst.2359968/ztst.in, output: /tmp/zsh.ztst.2359968/ztst.out, error: /tmp/zsh.ztst.2359968/ztst.terr test output It hanged at this step. Any help would be great. Thanks Ayappan P
On Tue, Jul 30, 2019 at 7:47 AM Ayappan P2 <ayappap2@in.ibm.com> wrote: > > We are porting zsh 5.5.1 in AIX. Why not 5.7.1, the more recent release? > Any help would be great. This is testing the coprocess, which uses pipe() and then dups the resulting descriptors before forking a child process. This means there is a situation where you have two-way communication between the parent and child, so if there is either insufficient buffer space [so write() blocks] or the buffers are not flushed [so read() blocks] then the exchange can deadlock. The test is assuming that pipes have more than 12 bytes of buffering but are flushed at least on a line-by-line basis.