Shells in OCaml
1Asynchronous jobs are tricky. For now, we disable them behind a flag in [set].
2
3 $ msh -c "echo hello &"
4 You are using asynchronous operators and [set -o async] has not been called.
5 [1]
6
7But we do have some support for them.
8
9 $ cat > msh.sh << EOF
10 > set -o async
11 > sleep 10000 & echo hello
12 > kill -9 \$!
13 > EOF
14
15 $ cat > test.sh << EOF
16 > sleep 10000 & echo hello
17 > kill -9 \$!
18 > EOF
19
20 $ sh test.sh
21 hello
22 $ msh msh.sh
23 hello