Lines Matching +full:- +full:- +full:pid

6 	jls -j "$check_name" -s | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g'
11 if [ "$(id -u)" -ne 0 ]; then
19 ln -sf /bin/sleep $sleep
21 name="pgrep -j <jid>"
23 jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \
24 command=daemon -p ${PWD}/${base}_1_1.pid $sleep $sleep_amount &
26 jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \
27 command=daemon -p ${PWD}/${base}_1_2.pid $sleep $sleep_amount &
35 [0-9]*,[0-9]*)
43 pid1="$(pgrep -f -x -j "$jid" "$sleep $sleep_amount" | sort)"
44 pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \
45 "$(cat ${PWD}/${base}_1_2.pid)" | sort)
47 echo "ok 1 - $name"
49 echo "not ok 1 - $name # pgrep output: '$pid1', pidfile output: '$pid2'"
51 [ -f ${PWD}/${base}_1_1.pid ] && kill "$(cat ${PWD}/${base}_1_1.pid)"
52 [ -f ${PWD}/${base}_1_2.pid ] && kill "$(cat ${PWD}/${base}_1_2.pid)"
55 name="pgrep -j any"
57 jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \
58 command=daemon -p ${PWD}/${base}_2_1.pid $sleep $sleep_amount &
60 jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \
61 command=daemon -p ${PWD}/${base}_2_2.pid $sleep $sleep_amount &
64 pid1="$(pgrep -f -x -j any "$sleep $sleep_amount" | sort)"
65 pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \
66 "$(cat ${PWD}/${base}_2_2.pid)" | sort)
68 echo "ok 2 - $name"
70 echo "not ok 2 - $name # pgrep output: '$pid1', pidfile output: '$pid2'"
72 [ -f ${PWD}/${base}_2_1.pid ] && kill "$(cat ${PWD}/${base}_2_1.pid)"
73 [ -f ${PWD}/${base}_2_2.pid ] && kill "$(cat ${PWD}/${base}_2_2.pid)"
76 name="pgrep -j none"
78 daemon -p ${PWD}/${base}_3_1.pid $sleep $sleep_amount &
79 jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \
80 command=daemon -p ${PWD}/${base}_3_2.pid $sleep $sleep_amount &
82 pid="$(pgrep -f -x -j none "$sleep $sleep_amount")"
83 if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then
84 echo "ok 3 - $name"
86 echo "not ok 3 - $name # pgrep output: '$pid1', pidfile output: '$pid2'"
88 [ -f ${PWD}/${base}_3_1.pid ] && kill "$(cat $PWD/${base}_3_1.pid)"
89 [ -f ${PWD}/${base}_3_2.pid ] && kill "$(cat $PWD/${base}_3_2.pid)"
93 name="pgrep -j <jname>"
95 jail -c path=/ name=${base}_4_1 ip4.addr=127.0.0.1 \
96 command=daemon -p ${PWD}/${base}_4_1.pid $sleep $sleep_amount &
98 jail -c path=/ name=${base}_4_2 ip4.addr=127.0.0.1 \
99 command=daemon -p ${PWD}/${base}_4_2.pid $sleep $sleep_amount &
104 pid1="$(pgrep -f -x -j "$jname" "$sleep $sleep_amount" | sort)"
105 pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_4_1.pid)" \
106 "$(cat ${PWD}/${base}_4_2.pid)" | sort)
108 echo "ok 4 - $name"
110 echo "not ok 4 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'"
112 [ -f ${PWD}/${base}_4_1.pid ] && kill "$(cat ${PWD}/${base}_4_1.pid)"
113 [ -f ${PWD}/${base}_4_2.pid ] && kill "$(cat ${PWD}/${base}_4_2.pid)"
116 rm -f $sleep