3
0

signal7.tests 393 B

123456789101112131415161718
  1. bug() {
  2. trap : exit
  3. # Bug was causing sh to be run in subshell,
  4. # as if this line is replaced with (sh -c ...; exit $?) &
  5. # here:
  6. sh -c 'echo REAL_CHILD=$$' &
  7. echo PARENTS_IDEA_OF_CHILD=$!
  8. wait # make sure bkgd shell completes
  9. }
  10. bug | {
  11. while read varval; do
  12. eval $varval
  13. done
  14. test x"$REAL_CHILD" != x"" \
  15. && test x"$REAL_CHILD" = x"$PARENTS_IDEA_OF_CHILD"
  16. echo "Bug detected: $?"
  17. }