summary refs log tree commit diff
path: root/src/sv.check
blob: d3c277ccb92fc51c61a6b82e2a2436f6f6401e25 (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
25
26
27
#!/bin/sh
rm -rf "${ctmp}"
trap 'rm -rf "${ctmp}"' EXIT

sv
echo $?
sv -V
echo $?

mkdir "${ctmp}"
cat >"${ctmp}"/run <<-\EOT
	#!/bin/sh
	echo starting
	exec sleep 14
	EOT
chmod 700 "${ctmp}"/run
runsv "${ctmp}" &
sleep 1
test -r "${ctmp}"/supervise/stat || sleep 2
sv down "${ctmp}"
echo $?
sleep 1
cat "${ctmp}"/supervise/stat
sv exit "${ctmp}"
echo $?
wait
echo $?