about summary refs log tree commit diff
path: root/src/tests/test-switch.wrapper
blob: 0c683ecf4f32d54d27f2d3a5e598186f26a75a73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -e

S=./.test-switch-socket
F=./.test-switch-fifo

pid=0

cleanup () {
  kill $pid
  rm -f ${S} ${S}.lock
}

mkfifo $F
head -n 1 < $F >/dev/null &
pid=$!
s6-ipcserver -1 -- ${S} ./nsssd-unix > $F &
wait $pid
pid=$!
rm -f $F
trap cleanup TERM INT EXIT
./test-switch