git.samba.org
/
metze
/
misc
/
junkcode.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4312190
)
splice: use fcntl(pfd[1], F_SETPIPE_SZ, buffer_size); in splice2.c
master
author
Stefan Metzmacher
<metze@samba.org>
Fri, 5 Apr 2013 07:09:20 +0000
(09:09 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 5 Apr 2013 07:09:20 +0000
(09:09 +0200)
metze
splice/splice2.c
patch
|
blob
|
history
diff --git
a/splice/splice2.c
b/splice/splice2.c
index 3b90d50a66540b1fdf94458dbf469ae20b3b4c3f..3ebade98e396408f068a78df93633729074a3160 100644
(file)
--- a/
splice/splice2.c
+++ b/
splice/splice2.c
@@
-32,7
+32,8
@@
int main(int argc, const char * const *argv)
if (strcmp(argv[1], "splice") == 0) {
pipe(pfd);
- fcntl(pfd[1], F_SETPIPE_SZ, 1048576);
+ fcntl(pfd[1], F_SETPIPE_SZ, buffer_size);
+ buffer_size = fcntl(pfd[1], F_GETPIPE_SZ);
} else {
buffer = malloc(buffer_size);
}