Created
April 28, 2016 14:21
-
-
Save momchil-velikov/91871548a03c2442e94d6d49c83fcfbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
int main() { | |
mkfifo("test-fifo", 0660); | |
printf("fifo PIPE_BUF: %ld\n", pathconf("test-fifo", _PC_PIPE_BUF)); | |
unlink("test-fifo"); | |
int fd[2]; | |
pipe(fd); | |
printf("pipe PIPE_BUF: %d\n", fcntl(fd[0], F_GETPIPE_SZ)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment