summary refs log tree commit diff
path: root/src/svwaitdown.check
blob: 5cf6c21029469ae5726e89071cc977ccf7423ec4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
rm -rf "${ctmp}"

svwaitdown
echo $?
svwaitdown -V
echo $?

mkdir "${ctmp}"
echo '#!/bin/sh' >"${ctmp}"/run
echo 'echo starting' >>"${ctmp}"/run
echo 'exec sleep 14' >>"${ctmp}"/run
chmod 700 "${ctmp}"/run
runsv "${ctmp}" &
sleep 1
test -r "${ctmp}"/supervise/stat || sleep 2
svwaitdown "${ctmp}"
echo $?
svwaitdown -x "${ctmp}"
echo $?
cat "${ctmp}"/supervise/stat
wait
echo $?
rm -rf "${ctmp}"