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
We now figure out if diff accepts -u and we'll use it instead of -c,
[rsync/rsync.git]
/
socket.c
diff --git
a/socket.c
b/socket.c
index
bb7acc0
..
eb0660b
100644
(file)
--- a/
socket.c
+++ b/
socket.c
@@
-374,7
+374,7
@@
int is_a_socket(int fd)
}
}
-void start_accept_loop(int port, int (*fn)(int
))
+void start_accept_loop(int port, int (*fn)(int
, int
))
{
int s;
extern char *bind_address;
{
int s;
extern char *bind_address;
@@
-429,11
+429,14
@@
void start_accept_loop(int port, int (*fn)(int ))
#endif
if ((pid = fork()) == 0) {
#endif
if ((pid = fork()) == 0) {
+ int ret;
close(s);
/* open log file in child before possibly giving
up privileges */
log_open();
close(s);
/* open log file in child before possibly giving
up privileges */
log_open();
- _exit(fn(fd));
+ ret = fn(fd, fd);
+ close_all();
+ _exit(ret);
} else if (pid < 0) {
rprintf(FERROR,
RSYNC_NAME
} else if (pid < 0) {
rprintf(FERROR,
RSYNC_NAME