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
3eb38818
Commit
3eb38818
authored
Aug 27, 1998
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a couple of changes to where the nonblocking settings are called.
parent
858fb9eb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
8 deletions
+24
-8
clientserver.c
clientserver.c
+3
-0
main.c
main.c
+11
-5
socket.c
socket.c
+7
-3
util.c
util.c
+3
-0
No files found.
clientserver.c
View file @
3eb38818
...
...
@@ -392,6 +392,9 @@ int daemon_main(void)
close
(
i
);
open
(
"/dev/null"
,
O_RDWR
);
}
set_nonblocking
(
STDIN_FILENO
);
return
start_daemon
(
STDIN_FILENO
);
}
...
...
main.c
View file @
3eb38818
...
...
@@ -250,15 +250,15 @@ static void do_server_sender(int f_in, int f_out, int argc,char *argv[])
argv
[
0
]
=
"."
;
}
set_nonblocking
(
f_out
);
if
(
f_in
!=
f_out
)
set_nonblocking
(
f_in
);
flist
=
send_file_list
(
f_out
,
argc
,
argv
);
if
(
!
flist
||
flist
->
count
==
0
)
{
exit_cleanup
(
0
);
}
set_nonblocking
(
f_out
);
if
(
f_in
!=
f_out
)
set_nonblocking
(
f_in
);
send_files
(
flist
,
f_out
,
f_in
);
report
(
f_out
);
io_flush
();
...
...
@@ -288,6 +288,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
if
(
f_in
!=
f_out
)
close
(
f_out
);
set_nonblocking
(
f_in
);
set_nonblocking
(
recv_pipe
[
1
]);
recv_files
(
f_in
,
flist
,
local_name
,
recv_pipe
[
1
]);
report
(
f_in
);
...
...
@@ -301,6 +302,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
if
(
f_in
!=
f_out
)
close
(
f_in
);
set_nonblocking
(
f_out
);
set_nonblocking
(
recv_pipe
[
0
]);
io_start_buffering
(
f_out
);
...
...
@@ -362,8 +364,12 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
extern
int
cvs_exclude
;
extern
int
am_sender
;
set_nonblocking
(
f_out
);
if
(
f_in
!=
f_out
)
set_nonblocking
(
f_in
);
setup_protocol
(
f_out
,
f_in
);
if
(
am_sender
)
{
recv_exclude_list
(
f_in
);
if
(
cvs_exclude
)
...
...
socket.c
View file @
3eb38818
...
...
@@ -54,6 +54,8 @@ int open_socket_out(char *host, int port)
return
-
1
;
}
set_nonblocking
(
res
);
return
res
;
}
...
...
@@ -110,9 +112,9 @@ determine if a file descriptor is in fact a socket
****************************************************************************/
int
is_a_socket
(
int
fd
)
{
int
v
,
l
;
l
=
sizeof
(
int
);
return
(
getsockopt
(
fd
,
SOL_SOCKET
,
SO_TYPE
,
(
char
*
)
&
v
,
&
l
)
==
0
);
int
v
,
l
;
l
=
sizeof
(
int
);
return
(
getsockopt
(
fd
,
SOL_SOCKET
,
SO_TYPE
,
(
char
*
)
&
v
,
&
l
)
==
0
);
}
...
...
@@ -165,6 +167,8 @@ void start_accept_loop(int port, int (*fn)(int ))
if
(
fork
()
==
0
)
{
close
(
s
);
set_nonblocking
(
fd
);
_exit
(
fn
(
fd
));
}
...
...
util.c
View file @
3eb38818
...
...
@@ -98,6 +98,9 @@ int piped_child(char **command,int *f_in,int *f_out)
*
f_in
=
from_child_pipe
[
0
];
*
f_out
=
to_child_pipe
[
1
];
set_nonblocking
(
*
f_in
);
set_nonblocking
(
*
f_out
);
return
pid
;
}
...
...
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