开发者

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

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, but first I'd like to see if I can solve an intermittent 开发者_如何学JAVAbuffer-overflow problem by just increasing the named-pipe size.


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜