Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
25d34a5c
Commit
25d34a5c
authored
Apr 08, 2002
by
Martin Pool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rearrange code slightly to avoid util.c depending on main.c.
parent
610364e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
main.c
main.c
+7
-1
util.c
util.c
+5
-4
No files found.
main.c
View file @
25d34a5c
...
...
@@ -231,7 +231,7 @@ static pid_t do_cmd(char *cmd,char *machine,char *user,char *path,int *f_in,int
if
(
local_server
)
{
if
(
read_batch
)
create_flist_from_batch
();
/* sets batch_flist */
ret
=
local_child
(
argc
,
args
,
f_in
,
f_out
);
ret
=
local_child
(
argc
,
args
,
f_in
,
f_out
,
child_main
);
}
else
{
ret
=
piped_child
(
args
,
f_in
,
f_out
);
}
...
...
@@ -493,6 +493,12 @@ static void do_server_recv(int f_in, int f_out, int argc,char *argv[])
}
void
child_main
(
int
argc
,
char
*
argv
[])
{
start_server
(
STDIN_FILENO
,
STDOUT_FILENO
,
argc
,
argv
);
}
void
start_server
(
int
f_in
,
int
f_out
,
int
argc
,
char
*
argv
[])
{
extern
int
cvs_exclude
;
...
...
util.c
View file @
25d34a5c
...
...
@@ -179,7 +179,8 @@ pid_t piped_child(char **command, int *f_in, int *f_out)
return
pid
;
}
pid_t
local_child
(
int
argc
,
char
**
argv
,
int
*
f_in
,
int
*
f_out
)
pid_t
local_child
(
int
argc
,
char
**
argv
,
int
*
f_in
,
int
*
f_out
,
int
(
*
child_main
)(
int
,
char
**
))
{
pid_t
pid
;
int
to_child_pipe
[
2
];
...
...
@@ -215,7 +216,7 @@ pid_t local_child(int argc, char **argv,int *f_in,int *f_out)
}
if
(
to_child_pipe
[
0
]
!=
STDIN_FILENO
)
close
(
to_child_pipe
[
0
]);
if
(
from_child_pipe
[
1
]
!=
STDOUT_FILENO
)
close
(
from_child_pipe
[
1
]);
start_server
(
STDIN_FILENO
,
STDOUT_FILENO
,
argc
,
argv
);
child_main
(
argc
,
argv
);
}
if
(
close
(
from_child_pipe
[
1
])
<
0
||
...
...
@@ -991,9 +992,9 @@ void show_progress(OFF_T ofs, OFF_T size)
*
* @param dest Target of the symlink in question.
*
* @
src
src Top source directory currently applicable. Basically this
* @
param
src Top source directory currently applicable. Basically this
* is the first parameter to rsync in a simple invocation, but it's
* modified
as topsrcname
in slightly complex ways.
* modified
by flist.c
in slightly complex ways.
*
* @retval True if unsafe
* @retval False is unsafe
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment