]> git.draconx.ca Git - liblbx.git/commitdiff
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)
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.


No differences found