1: #!/bin/ksh
2:
3: background()
4: {
5: sleep 10
6: echo "Background"
7: sleep 10
8: }
9:
10: echo "ps before background function"
11: ps
12: background &
13: echo "My PID=$$"
14: echo "Background function PID=$!"
15: echo "ps after background function"
16: ps
17: exit 0
| last modified 09/02/2006 | Introduction | Table of Contents (frame/no frame) |
Printable (single file) |
© Dartmouth College |