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
c4a5c57d
Commit
c4a5c57d
authored
Feb 18, 2002
by
Martin Pool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If the daemon is unable to fork a child to accept a connection, print
an error message. (Colin Walters)
parent
404e813c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
NEWS
NEWS
+4
-1
socket.c
socket.c
+12
-1
No files found.
NEWS
View file @
c4a5c57d
...
...
@@ -30,4 +30,7 @@ rsync 2.5.3 (not released yet)
* Added --no-whole-file and --no-blocking-io options (Dave Dykstra)
* Made the --write-batch and --read-batch options actually work
and added documentation in the man page (Jos Backus)
and added documentation in the man page (Jos Backus)
* If the daemon is unable to fork a child to accept a connection,
print an error message. (Colin Walters)
socket.c
View file @
c4a5c57d
...
...
@@ -387,6 +387,7 @@ void start_accept_loop(int port, int (*fn)(int ))
for each incoming connection */
while
(
1
)
{
fd_set
fds
;
pid_t
pid
;
int
fd
;
struct
sockaddr_storage
addr
;
socklen_t
addrlen
=
sizeof
addr
;
...
...
@@ -418,12 +419,22 @@ void start_accept_loop(int port, int (*fn)(int ))
while
(
waitpid
(
-
1
,
NULL
,
WNOHANG
)
>
0
);
#endif
if
(
fork
()
==
0
)
{
if
(
(
pid
=
fork
())
==
0
)
{
close
(
s
);
/* open log file in child before possibly giving
up privileges */
log_open
();
_exit
(
fn
(
fd
));
}
else
if
(
pid
<
0
)
{
rprintf
(
FERROR
,
RSYNC_NAME
": could not create child server process: %s
\n
"
,
strerror
(
errno
));
close
(
fd
);
/* This might have happened because we're
* overloaded. Sleep briefly before trying to
* accept again. */
sleep
(
2
);
}
close
(
fd
);
...
...
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