Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
87ba728
)
Die with an appropriate error if do_fork() fails.
author
Wayne Davison
<wayned@samba.org>
Sat, 13 Nov 2004 21:49:26 +0000
(21:49 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sat, 13 Nov 2004 21:49:26 +0000
(21:49 +0000)
main.c
patch
|
blob
|
blame
|
history
diff --git
a/main.c
b/main.c
index
20c93c2
..
2baac16
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-486,7
+486,12
@@
static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
io_flush(NORMAL_FLUSH);
- if ((pid = do_fork()) == 0) {
+ if ((pid = do_fork()) == -1) {
+ rsyserr(FERROR, errno, "fork failed in do_recv()");
+ exit_cleanup(RERR_IPC);
+ }
+
+ if (pid == 0) {
close(error_pipe[0]);
if (need_name_pipe) {
close(name_pipe[1]);