Output some info about the size of our structures.
[rsync/rsync.git] / clientserver.c
index d27ced3..b777125 100644 (file)
@@ -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 (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;
        }
@@ -678,7 +680,7 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
 
        if (!ret || err_msg) {
                if (err_msg)
-                       rprintf(FERROR, err_msg);
+                       rwrite(FERROR, err_msg, strlen(err_msg));
                else
                        option_error();
                msleep(400);