summaryrefslogtreecommitdiff
path: root/shell/ash_doc.txt
blob: d8a48c11431170ea17a924a0785262dbf6f3c2c6 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
	Wait + signals

We had some bugs here which are hard to test in testsuite.

Bug 1280 (http://busybox.net/bugs/view.php?id=1280):
was misbehaving in interactive ash. Correct behavior:

$ sleep 20 &
$ wait
^C
$ wait
^C
$ wait
^C
...


Bug 1984 (http://busybox.net/bugs/view.php?id=1984):
traps were not triggering:

trap_handler_usr () {
    echo trap usr
}
trap_handler_int () {
    echo trap int
}
trap trap_handler_usr USR1
trap trap_handler_int INT
sleep 3600 &
echo "Please do: kill -USR1 $$"
echo "or: kill -INT $$"
while true; do wait; echo wait interrupted; done


Bug 189 (https://bugs.busybox.net/show_bug.cgi?id=189)

func() {
    sleep 1
}
while (true); do
    func
    echo Looping
done

^C was observed to make ash processes geometrically multiply (!) instead
of exiting. (true) in subshell does not seem to matter, as another user
reports the same with:

while true
do
  echo Kill me
  sleep 1
done