As discussed on #awesome, the attached patch makes awesome-client exit
with a meaningful value (i.e. that of errno) when it encounters an
error. Since the most frequent error with awesome-client is a mismatch
in the socket path, there is an explicit case for ENOENT errors. I
thought of adding a matching fprintf in awesome.c, but you can tell what
socket awesome is listening on by looking at what ~/.awesome_ctl.* file
you have.
CAVEAT: Exiting on error may break setups such as:
while true; do
echo "some text"
done | /path/to/awesome-client
which relied on awesome-client continuing to send to the given socket
(although failing) until EOF was encountered on stdin.