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

@ -853,15 +853,16 @@
#define STRING_TEXT_AMBIGUOUS "Ambiguo {1} '{2}' - puede ser "
// 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 "El uri '{1}' no parece ser un directorio."
#define STRING_TRANSPORT_CURL_URI "Cuando se usa el protocolo 'curl' el uri debe contener un nombre de máquina."
#define STRING_TRANSPORT_CURL_WILDCD "Cuando se usa el protocolo 'curl' no están soportados los comodines."
#define STRING_TRANSPORT_CURL_NORUN "No se pudo lanzar curl. ¿Está instalado y disponible en $PATH?"
#define STRING_TRANSPORT_CURL_FAIL "Curl falló, consulte los mensajes precedentes."
#define STRING_TRANSPORT_RSYNC_URI "Cuando se usa el protocolo 'rsync' el uri debe contener un nombre de máquina."
#define STRING_TRANSPORT_RSYNC_NORUN "No se pudo lanzar rsync. ¿Está instalado y disponible en $PATH?"
#define STRING_TRANSPORT_RSYNC_FAIL "rsync failed, see output above."
#define STRING_TRANSPORT_SSH_URI "Cuando se usa el protocolo 'ssh' el uri debe contener un nombre de máquina."
#define STRING_TRANSPORT_SSH_NORUN "No se pudo lanzar ssh. ¿Está instalado y disponible en $PATH?"
#define STRING_TRANSPORT_SSH_FAIL "ssh failed, see output above."
// Uri
#define STRING_URI_QUOTES "No se pudo interpretar el uri '{1}', uso erróneo de comillas simples."