]> git.draconx.ca Git - liblbx.git/commit
Work around shell redirection bug on HP-UX /bin/sh.
authorNick Bowler <nbowler@draconx.ca>
Sun, 26 Sep 2021 06:05:26 +0000 (02:05 -0400)
committerNick Bowler <nbowler@draconx.ca>
Sun, 26 Sep 2021 06:05:26 +0000 (02:05 -0400)
commitfdff28dfb693888c083c47255c784256bede64cb
treebbfed420a253466201a5a94fee1b8b836ba8e809
parent61342041b52f7a2fc861853b15bde356cd66bfed
Work around shell redirection bug on HP-UX /bin/sh.

On HP-UX /bin/sh, when "read" is used in a subshell with redirections,
it seems that some of the input gets dropped on the floor.  For example:

  % cat >test.txt <<'EOF'
  hello
  world
EOF
  % ( exec 3<test.txt; read a <&3; read b <&3; echo $a $b )
  hello

In TEST_CHECK_PAM_MD5, we hit this bug because AT_CHECK runs its
commands in a subshell, and as a result some of the image data is
lost after reading the header and verification fails.

Work around the issue by performing only a single AT_CHECK with a
single redirection.
tests/moo2data.at