git.samba.org
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71c2e1b
)
Close the output fd when fsync() fails on it.
author
Wayne Davison
<wayned@samba.org>
Tue, 20 Mar 2007 17:09:09 +0000
(17:09 +0000)
committer
Wayne Davison
<wayned@samba.org>
Tue, 20 Mar 2007 17:09:09 +0000
(17:09 +0000)
fsync.diff
patch
|
blob
|
history
diff --git
a/fsync.diff
b/fsync.diff
index 276c454f8a779e5cce34b10e1713b63d89a6b158..9877bcb407d22c4500a509596e2f4d4a9859d645 100644
(file)
--- a/
fsync.diff
+++ b/
fsync.diff
@@
-86,13
+86,14
@@
To use this patch, run these commands for a successful build:
extern int modify_window;
extern int relative_paths;
extern int human_readable;
-@@ -309,6 +310,1
2
@@ int copy_file(const char *source, const
+@@ -309,6 +310,1
3
@@ int copy_file(const char *source, const
full_fname(source));
}
+ if (do_fsync && fsync(ofd) < 0) {
+ rsyserr(FERROR, errno, "fsync failed on %s",
+ full_fname(dest));
++ close(ofd);
+ return -1;
+ }
+