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
82980a23
Commit
82980a23
authored
Aug 16, 2000
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed timing problem with cleanup and io_flush() by using non-blocking
waitpid()
parent
b6a30afc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
+17
-14
main.c
main.c
+13
-0
rsync.h
rsync.h
+4
-0
util.c
util.c
+0
-14
No files found.
main.c
View file @
82980a23
...
...
@@ -25,6 +25,19 @@ struct stats stats;
extern
int
verbose
;
/****************************************************************************
wait for a process to exit, calling io_flush while waiting
****************************************************************************/
void
wait_process
(
pid_t
pid
,
int
*
status
)
{
while
(
waitpid
(
pid
,
status
,
WNOHANG
)
==
0
)
{
sleep
(
1
);
io_flush
();
}
*
status
=
WEXITSTATUS
(
*
status
);
}
static
void
report
(
int
f
)
{
time_t
t
=
time
(
NULL
);
...
...
rsync.h
View file @
82980a23
...
...
@@ -510,4 +510,8 @@ size_t strlcpy(char *d, const char *s, size_t bufsize);
size_t
strlcat
(
char
*
d
,
const
char
*
s
,
size_t
bufsize
);
#endif
#ifndef WEXITSTATUS
#define WEXITSTATUS(stat) ((int)(((stat)>>8)&0xFF))
#endif
#define exit_cleanup(code) _exit_cleanup(code, __FILE__, __LINE__)
util.c
View file @
82980a23
...
...
@@ -929,20 +929,6 @@ char *timestring(time_t t)
return
(
TimeBuf
);
}
/****************************************************************************
like waitpid but does the WEXITSTATUS
****************************************************************************/
#ifndef WEXITSTATUS
#define WEXITSTATUS(stat) ((int)(((stat)>>8)&0xFF))
#endif
void
wait_process
(
pid_t
pid
,
int
*
status
)
{
waitpid
(
pid
,
status
,
0
);
*
status
=
WEXITSTATUS
(
*
status
);
}
#ifdef __INSURE__
#include <dlfcn.h>
...
...
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