Fifo: F_{G,S}ETPIPE_SZ is Linux specific

This commit is contained in:
Peter Keresztes Schmidt 2021-03-03 23:29:28 +01:00
parent 20fe6153d5
commit 1dfa41923b
1 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,7 @@ bool Fifo::open() {
return false;
}
}
#ifdef __linux__
int ret = fcntl(raw_fd, F_SETPIPE_SZ, 1024 * 1024);
if (ret < 0) {
Error("set pipe size failed.");
@ -87,6 +88,7 @@ bool Fifo::open() {
perror("get pipe size failed.");
}
Debug(1, "default pipe size: %ld\n", pipe_size);
#endif
return true;
}