Commit Graph

7 Commits

Author SHA1 Message Date
Nikos Ntarmos 1a829fd76d Make awesome-client exit with a meaningful value on error
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.
2007-11-19 20:42:06 +01:00
Julien Danjou f28f0e7407 add display name in socket path 2007-10-29 17:29:58 +01:00
Julien Danjou 7476a9712a don't forget to delete addr pointers 2007-10-29 16:23:05 +01:00
Julien Danjou c8e489d4c9 return EXIT_FAILURE on failure 2007-10-29 16:20:11 +01:00
Julien Danjou 27e7706800 move common stuff for socket com into awesome-client-common.c 2007-10-29 16:14:50 +01:00
Julien Danjou 7e755c17ea add awesome-client.h with common #define and add copyright notice in awesome-client.c 2007-10-27 18:47:13 +02:00
daniel@brinkers.de 23d2e4dd57 add awesome-client to communicate via awesome socket 2007-10-27 18:11:27 +02:00