File: signal7.tests

package info (click to toggle)
busybox 1%3A1.30.1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 26,768 kB
  • sloc: ansic: 182,637; sh: 8,979; cpp: 1,428; makefile: 1,023; yacc: 570; lex: 355; perl: 312; python: 109; awk: 29
file content (18 lines) | stat: -rwxr-xr-x 393 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
bug() {
	trap : exit
	# Bug was causing sh to be run in subshell,
	# as if this line is replaced with (sh -c ...; exit $?) &
	# here:
	sh -c 'echo REAL_CHILD=$$' &
	echo PARENTS_IDEA_OF_CHILD=$!
	wait  # make sure bkgd shell completes
}

bug | {
while read varval; do
	eval $varval
done
test x"$REAL_CHILD" != x"" \
&& test x"$REAL_CHILD" = x"$PARENTS_IDEA_OF_CHILD"
echo "Bug detected: $?"
}