search for: to_child_pipe

Displaying 6 results from an estimated 6 matches for "to_child_pipe".

2013 Jan 31
0
File descriptors in pipe.c
...-daemon mode, it forks the SSH process in pipe.c function. For the communication between the parent rsync and child SSH, it uses the socket pairs. As socket pairs are bidirectional, only one pair can be used for communication between the parent and child. e.g. socketpair(xx,xx,xx,xx) returns -> to_child_pipe[2]={3,4} then these two file descriptors 3 and 4 can be used one at each end for reading and writing. But in the rsync code, two pairs are created as to_child_pipe and from_child_pipe ------------------------------------------------------------ --------------------- if (fd_pair(to_child_pipe) &...
2009 Nov 04
0
PATCH: fast copy of files in local server mode
...0.6.fast/pipe.c 2009-09-23 14:40:42.000000000 +0300 @@ -29,6 +29,7 @@ extern mode_t orig_umask; extern char *logfile_name; extern struct chmod_mode_struct *chmod_modes; +int local_socket = 0; /** * Create a child connected to us via its stdin/stdout. @@ -111,11 +112,15 @@ pid_t pid; int to_child_pipe[2]; int from_child_pipe[2]; + int child_socket[2]; /* The parent process is always the sender for a local rsync. */ assert(am_sender); if (fd_pair(to_child_pipe) < 0 || +#ifdef HAVE_SOCKETPAIR + fd_pair(child_socket) < 0 || +#endif fd_pair(from_child_pipe) < 0) { rsys...
2009 Mar 25
1
Pipe creation problem: From Java app using rsync + ssh on windows with cygwin
...bler - rsync: pipe: Operation not permitted (1) DEBUG: com.mddc.client.rsync.StreamGobbler - rsync error: error in IPC code (code 14) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/pipe.c(57) [sender=3.0.4] * The rsync code where the error happens is pipe.c(57) which is this. if (fd_pair(to_child_pipe) < 0 || fd_pair(from_child_pipe) < 0) { rsyserr(FERROR, errno, "pipe"); exit_cleanup(RERR_IPC); } So for some reason fd_pair(to_child_pipe) is < 0 or fd_pair(from_child_pipe) < 0. If anyone has any suggestions it would be great as I'm stuck now. Thank...
2001 Aug 06
1
merge rsync+ into rsync (was Re: rsync-2.4.7 NEWS file)
> Just curious: what about the rsync+ patch? Thanks for the reminder. I've just committed Jos's rsync+ patch onto the "branch_mbp_rsyncplus_merge" branch. If it works OK and nobody screams I will move it across onto the main tree tomorrow or Wednesday. I see the patch doesn't add documentation about the new options to the man page, so we should fix that in the future.
2004 Jul 12
2
[PATCH] Batch-mode rewrite
...* processes, so we must make sure that only one + * actually writes. It shouldn't matter which one, + * because they must produce the same file. + */ + write_batch = 0; + if (!am_sender) filesfrom_fd = -1; *************** *** 129,134 **** --- 150,156 ---- } if (to_child_pipe[0] != STDIN_FILENO) close(to_child_pipe[0]); if (from_child_pipe[1] != STDOUT_FILENO) close(from_child_pipe[1]); + if (read_batch) exit_cleanup(0); /* no reason to continue */ child_main(argc, argv); }
2004 May 29
1
[patch] Filename conversion
...ations like the one on * Solaris. + * + * If register_child is nonzero then the child is registered for autocleanup. **/ -pid_t piped_child(char **command, int *f_in, int *f_out) +pid_t piped_child(char **command, int *f_in, int *f_out, int blocking_io, int register_child) { pid_t pid; int to_child_pipe[2]; @@ -57,7 +58,7 @@ pid_t piped_child(char **command, int *f } - pid = do_fork(); + pid = register_child ? do_fork() : fork(); if (pid == -1) { rprintf(FERROR, "fork: %s\n", strerror(errno)); exit_cleanup(RERR_IPC); diff -rupNP rsync-2.6.2/syscall.c rsync-2.6.2-fnameconv.c...