#!/bin/sh -e S=./.test-switch-socket F=./.test-switch-fifo pid=0 cleanup () { kill $pid rm -f $S } 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