From 1581102195ece168cc6b3c862ec3cc19fbb8f906 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 1 Mar 2013 23:00:32 +0000 Subject: Kickoff --- jaildaemon.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 jaildaemon.sh (limited to 'jaildaemon.sh') diff --git a/jaildaemon.sh b/jaildaemon.sh new file mode 100755 index 0000000..0741c23 --- /dev/null +++ b/jaildaemon.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +echo Need a running jail with jid 1 for this test. Enter to proceed +read a + +killall jaildaemon +./jaildaemon -D + +# daemon comes back too fast, so uds is not yet open +sleep 1 +./jaildaemon -j 1 -c '/usr/bin/touch /foo' -t Schnupsi -r + +echo -n "Killing (respawnin) task: " +pgrep -f Schnupsi + +pkill -HUP -f Schnupsi + +echo "Yielding file, touched by task:" +ls -al /foo + +echo "Deleting file" +rm -r /foo + +echo +echo -n "New task id: " +pgrep -f Schnupsi + +echo "Killing with normal signal:" + +pkill -f Schnupsi + +echo "Expecting no file here:" +ls -al /foo + +echo "Also expecting no command to match:" +pgrep -f Schnupsi -- cgit v1.2.3