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
d79d1c69
Commit
d79d1c69
authored
Dec 09, 1999
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a bug with waitpid() - I'd forgotten about WEXITSTATUS !
parent
a7d068ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
main.c
main.c
+3
-3
util.c
util.c
+9
-0
No files found.
main.c
View file @
d79d1c69
...
@@ -310,7 +310,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
...
@@ -310,7 +310,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
generate_files
(
f_out
,
flist
,
local_name
,
recv_pipe
[
0
]);
generate_files
(
f_out
,
flist
,
local_name
,
recv_pipe
[
0
]);
io_flush
();
io_flush
();
wait
pid
(
pid
,
&
status
,
0
);
wait
_process
(
pid
,
&
status
);
return
status
;
return
status
;
}
}
...
@@ -406,7 +406,7 @@ int client_run(int f_in, int f_out, int pid, int argc, char *argv[])
...
@@ -406,7 +406,7 @@ int client_run(int f_in, int f_out, int pid, int argc, char *argv[])
if
(
verbose
>
3
)
if
(
verbose
>
3
)
rprintf
(
FINFO
,
"client_run waiting on %d
\n
"
,
pid
);
rprintf
(
FINFO
,
"client_run waiting on %d
\n
"
,
pid
);
io_flush
();
io_flush
();
wait
pid
(
pid
,
&
status
,
0
);
wait
_process
(
pid
,
&
status
);
}
}
report
(
-
1
);
report
(
-
1
);
exit_cleanup
(
status
);
exit_cleanup
(
status
);
...
@@ -430,7 +430,7 @@ int client_run(int f_in, int f_out, int pid, int argc, char *argv[])
...
@@ -430,7 +430,7 @@ int client_run(int f_in, int f_out, int pid, int argc, char *argv[])
if
(
verbose
>
3
)
if
(
verbose
>
3
)
rprintf
(
FINFO
,
"client_run2 waiting on %d
\n
"
,
pid
);
rprintf
(
FINFO
,
"client_run2 waiting on %d
\n
"
,
pid
);
io_flush
();
io_flush
();
wait
pid
(
pid
,
&
status
,
0
);
wait
_process
(
pid
,
&
status
);
}
}
return
status
|
status2
;
return
status
|
status2
;
...
...
util.c
View file @
d79d1c69
...
@@ -870,3 +870,12 @@ char *timestring(time_t t)
...
@@ -870,3 +870,12 @@ char *timestring(time_t t)
return
(
TimeBuf
);
return
(
TimeBuf
);
}
}
/****************************************************************************
like waitpid but does the WEXITSTATUS
****************************************************************************/
void
wait_process
(
pid_t
pid
,
int
*
status
)
{
waitpid
(
pid
,
status
,
0
);
*
status
=
WEXITSTATUS
(
*
status
);
}
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