File: sig.sh

package info (click to toggle)
bashdb 3.1.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,252 kB
  • ctags: 117
  • sloc: sh: 4,880; pascal: 3,186; lisp: 484; makefile: 315; ansic: 294
file content (25 lines) | stat: -rwxr-xr-x 436 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!../../bash
# Signal handling tests
child_handler() {
  echo "child handler called"
}

if [[ "$1"x != x ]] ; then 
  echo "child process $$ here..."
  for (( i=1; i<=1000 ; i++ )) ; do 
    x=`echo b*`
    for (( j=1; j<=1000 ; j++ )) ; do 
      x=`echo t*`
      x=`echo *source*`
    done
  done
  exit 1
fi

# set -x
x=18
# CHLD handler should not be clobbered by debugger.
trap child_handler CHLD
kill -INT $$
kill -INT $$
exit 0