Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
If the pre-xfer exec failed with -1, output the strerror()
[rsync/rsync.git]
/
clientserver.c
diff --git
a/clientserver.c
b/clientserver.c
index
97f4fe1
..
b777125
100644
(file)
--- a/
clientserver.c
+++ b/
clientserver.c
@@
-244,7
+244,9
@@
static char *finish_pre_exec(pid_t pid, int fd, char *request,
if (wait_process(pid, &status, 0) < 0
|| !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
char *e;
if (wait_process(pid, &status, 0) < 0
|| !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
char *e;
- if (asprintf(&e, "pre-xfer exec returned failure (%d)\n", status) < 0)
+ if (asprintf(&e, "pre-xfer exec returned failure (%d)%s%s\n",
+ status, status < 0 ? ": " : "",
+ status < 0 ? strerror(errno) : "") < 0)
out_of_memory("finish_pre_exec");
return e;
}
out_of_memory("finish_pre_exec");
return e;
}