I'm watching wpa_supplicant
so I can kill my script if the password is wrong.
I background the whole code block below. I can see the echo
run but the exit
doesn't seem to stop my main script.
(sudo stdbuf -o0 wpa_supplicant -Dwext -i$wifi -cwifi.conf 2>&1 \
| grep -m 1 "pre-shared key may be incorrect" \
&& echo I see this \
&& exit) &
I suspect the exit
here is just killing a thread which has been backgrounded?
Is that the case? If so how can I kill
the parent here?