Is it possible to change the size of a named pipe on Linux?

后端 未结 1 1955
醉话见心
醉话见心 2020-12-16 16:55

I know that for the current version of the Linux kernel, the size of named pipes is 64K. Is it possible to increase this size at all?

I know I can switch to sockets,

相关标签:
1条回答
  • 2020-12-16 17:20

    With recent kernels (>= 2.6.35), you can change the size of a pipe with

    fcntl(fd, F_SETPIPE_SZ, size)
    

    where size is a long. The maximum size is in /proc/sys/fs/pipe-max-size.

    0 讨论(0)
提交回复
热议问题