diff options
author | Mattias Andrée <maandree@kth.se> | 2017-06-13 21:13:25 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2017-06-13 21:13:25 +0200 |
commit | 0751b41ab058f177e65e0a5c57ea0557e8235d93 (patch) | |
tree | ff222db89d2c333f0e5f37d4d975db61bea435cf /bench.c | |
parent | m (diff) | |
download | pipes-are-slow-0751b41ab058f177e65e0a5c57ea0557e8235d93.tar.gz pipes-are-slow-0751b41ab058f177e65e0a5c57ea0557e8235d93.tar.bz2 pipes-are-slow-0751b41ab058f177e65e0a5c57ea0557e8235d93.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | bench.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -61,6 +61,10 @@ main(void) } pipe(rw); +#if 0 + if (fcntl(*rw, F_SETPIPE_SZ, 1 << 20) < 0) + return perror("fcntl F_SETPIPE_SZ"), 1; +#endif if (!fork()) { close(rw[1]); while (read(rw[0], buf, n) > 0); @@ -79,6 +83,10 @@ main(void) } pipe(rw); +#if 0 + if (fcntl(*rw, F_SETPIPE_SZ, 1 << 20) < 0) + return perror("fcntl F_SETPIPE_SZ"), 1; +#endif if (!fork()) { close(rw[1]); while (read(rw[0], buf, n) > 0); |