Clean up Transport::execute() and callers.

- Ensure that the real exit code of the child program is retrieved
  using WEXITSTATUS().

- Centralise the handling of code 127, which means that the child
  shell process could not execute its child (ssh, rsync, or curl.)

Signed-off-by: Russell Steicke <russells@adelie.cx>
This commit is contained in:
Russell Steicke 2013-03-03 20:57:26 +08:00 committed by Paul Beckingham
parent 3dab5a1cb1
commit 1428a4135b
7 changed files with 41 additions and 33 deletions

View file

@ -837,15 +837,16 @@
#define STRING_TEXT_AMBIGUOUS "Ambiguous {1} '{2}' - could be either of "
// Transport
#define STRING_TRANSPORT_NORUN "Could not run '{1}'. Is it installed, and available in $PATH?"
#define STRING_TRANSPORT_NOFORK "Could not run '{1}': {2}. Are you out of system resources?"
#define STRING_TRANSPORT_URI_NODIR "The uri '{1}' does not appear to be a directory."
#define STRING_TRANSPORT_CURL_URI "When using the 'curl' protocol, the uri must contain a hostname."
#define STRING_TRANSPORT_CURL_WILDCD "When using the 'curl' protocol, wildcards are not supported."
#define STRING_TRANSPORT_CURL_NORUN "Could not run curl. Is it installed, and available in $PATH?"
#define STRING_TRANSPORT_CURL_FAIL "Curl failed, see output above."
#define STRING_TRANSPORT_RSYNC_URI "When using the 'rsync' protocol, the uri must contain a hostname."
#define STRING_TRANSPORT_RSYNC_NORUN "Could not run rsync. Is it installed, and available in $PATH?"
#define STRING_TRANSPORT_RSYNC_FAIL "rsync failed, see output above."
#define STRING_TRANSPORT_SSH_URI "When using the 'ssh' protocol, the uri must contain a hostname."
#define STRING_TRANSPORT_SSH_NORUN "Could not run ssh. Is it installed, and available in $PATH?"
#define STRING_TRANSPORT_SSH_FAIL "ssh failed, see output above."
// Uri
#define STRING_URI_QUOTES "Could not parse uri '{1}', wrong usage of single quotes."