Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d02984b
)
Show helper program with -v when opening connection.
author
Martin Pool
<mbp@samba.org>
Thu, 24 Jan 2002 04:21:42 +0000
(
04:21
+0000)
committer
Martin Pool
<mbp@samba.org>
Thu, 24 Jan 2002 04:21:42 +0000
(
04:21
+0000)
Doc.
socket.c
patch
|
blob
|
blame
|
history
diff --git
a/socket.c
b/socket.c
index
8f8d96d
..
8822804
100644
(file)
--- a/
socket.c
+++ b/
socket.c
@@
-830,6
+830,13
@@
static int socketpair_tcp(int fd[2])
int sock_exec(const char *prog)
{
int fd[2];
int sock_exec(const char *prog)
{
int fd[2];
+
+ if (verbose > 0) {
+ rprintf(FINFO, RSYNC_NAME
+ ": open connection using \"%s\"\n",
+ prog);
+ }
+
if (socketpair_tcp(fd) != 0) {
rprintf (FERROR, RSYNC_NAME
": socketpair_tcp failed (%s)\n",
if (socketpair_tcp(fd) != 0) {
rprintf (FERROR, RSYNC_NAME
": socketpair_tcp failed (%s)\n",
@@
-842,10
+849,12
@@
int sock_exec(const char *prog)
close(1);
dup(fd[1]);
dup(fd[1]);
close(1);
dup(fd[1]);
dup(fd[1]);
- if (verbose > 3)
+ if (verbose > 3) {
+ /* Can't use rprintf because we've forked. */
fprintf (stderr,
RSYNC_NAME ": execute socket program \"%s\"\n",
prog);
fprintf (stderr,
RSYNC_NAME ": execute socket program \"%s\"\n",
prog);
+ }
exit (system (prog));
}
close (fd[1]);
exit (system (prog));
}
close (fd[1]);