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
c80ccabb
Commit
c80ccabb
authored
Jun 23, 2000
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added --blocking-io option
parent
ef5d23eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
options.c
options.c
+8
-1
util.c
util.c
+4
-0
No files found.
options.c
View file @
c80ccabb
...
...
@@ -67,6 +67,7 @@ int delete_after=0;
int
only_existing
=
0
;
int
max_delete
=
0
;
int
ignore_errors
=
0
;
int
blocking_io
=
0
;
char
*
backup_suffix
=
BACKUP_SUFFIX
;
char
*
tmpdir
=
NULL
;
...
...
@@ -156,6 +157,7 @@ void usage(enum logcode F)
rprintf
(
F
,
" --address bind to the specified address
\n
"
);
rprintf
(
F
,
" --config=FILE specify alternate rsyncd.conf file
\n
"
);
rprintf
(
F
,
" --port=PORT specify alternate rsyncd port number
\n
"
);
rprintf
(
F
,
" --blocking-io use blocking IO for the remote shell
\n
"
);
rprintf
(
F
,
" --stats give some file transfer stats
\n
"
);
rprintf
(
F
,
" --progress show progress during transfer
\n
"
);
rprintf
(
F
,
" --log-format=FORMAT log file transfers using specified format
\n
"
);
...
...
@@ -176,7 +178,7 @@ enum {OPT_VERSION, OPT_SUFFIX, OPT_SENDER, OPT_SERVER, OPT_EXCLUDE,
OPT_COPY_UNSAFE_LINKS
,
OPT_SAFE_LINKS
,
OPT_COMPARE_DEST
,
OPT_LOG_FORMAT
,
OPT_PASSWORD_FILE
,
OPT_SIZE_ONLY
,
OPT_ADDRESS
,
OPT_DELETE_AFTER
,
OPT_EXISTING
,
OPT_MAX_DELETE
,
OPT_BACKUP_DIR
,
OPT_IGNORE_ERRORS
,
OPT_BWLIMIT
};
OPT_IGNORE_ERRORS
,
OPT_BWLIMIT
,
OPT_BLOCKING_IO
};
static
char
*
short_options
=
"oblLWHpguDCtcahvqrRIxnSe:B:T:zP"
;
...
...
@@ -234,6 +236,7 @@ static struct option long_options[] = {
{
"partial"
,
0
,
0
,
OPT_PARTIAL
},
{
"delete-after"
,
0
,
0
,
OPT_DELETE_AFTER
},
{
"ignore-errors"
,
0
,
0
,
OPT_IGNORE_ERRORS
},
{
"blocking-io"
,
0
,
0
,
OPT_BLOCKING_IO
},
{
"config"
,
1
,
0
,
OPT_CONFIG
},
{
"port"
,
1
,
0
,
OPT_PORT
},
{
"log-format"
,
1
,
0
,
OPT_LOG_FORMAT
},
...
...
@@ -539,6 +542,10 @@ int parse_arguments(int argc, char *argv[], int frommain)
ignore_errors
=
1
;
break
;
case
OPT_BLOCKING_IO
:
blocking_io
=
1
;
break
;
case
'P'
:
do_progress
=
1
;
keep_partial
=
1
;
...
...
util.c
View file @
c80ccabb
...
...
@@ -88,6 +88,7 @@ int piped_child(char **command,int *f_in,int *f_out)
int
pid
;
int
to_child_pipe
[
2
];
int
from_child_pipe
[
2
];
extern
int
blocking_io
;
if
(
fd_pair
(
to_child_pipe
)
<
0
||
fd_pair
(
from_child_pipe
)
<
0
)
{
...
...
@@ -116,6 +117,9 @@ int piped_child(char **command,int *f_in,int *f_out)
if
(
from_child_pipe
[
1
]
!=
STDOUT_FILENO
)
close
(
from_child_pipe
[
1
]);
umask
(
orig_umask
);
set_blocking
(
STDIN_FILENO
);
if
(
blocking_io
)
{
set_blocking
(
STDOUT_FILENO
);
}
execvp
(
command
[
0
],
command
);
rprintf
(
FERROR
,
"Failed to exec %s : %s
\n
"
,
command
[
0
],
strerror
(
errno
));
...
...
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