Pass command exit status via sideband to client.
authorAndre Noll <maan@systemlinux.org>
Sun, 26 Feb 2012 13:14:18 +0000 (14:14 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 7 May 2012 10:59:07 +0000 (12:59 +0200)
commit32ffc06c0706f51c3f1dc436911836f1f9aa326e
treeade71292604385ccfe5cafce1c30563139d9d21e
parent7dc1b56764191dab6aedf360c7a6d648fa49a37c
Pass command exit status via sideband to client.

Currently the only way for the client side to tell whether a command
failed is to parse the command output. This patch changes command.c to
send an empty sideband packet at command termination. If the command
succeeded, the sideband designator is set to SBD_EXIT__SUCCESS,
otherwise it is SBD_EXIT__FAILURE.

The client checks for these sideband packets and terminates with
EXIT_FAILURE if it received the SBD_EXIT__FAILURE packet.
client.c
client_common.c
command.c
error.h