doing fd buffer bigger

doing fd buffer bigger

Post by David Tralle » Fri, 04 Oct 2002 04:58:31



I create a pipe with a pipe call (logic).
When I go to write in the pipe, the process is blocked because I write
more than 1 page (4096 bytes). In my program that CANNOT happend (gets
blocked). I am sure that I am not going to write MORE than 2 pages.

How can I make pipe-write-buffer bigger? (I thought that FIONBIO was
the option in ioctl call, but I it doesnt look like that)

thanks in advance,
DTM

 
 
 

doing fd buffer bigger

Post by Kasper Dupon » Fri, 04 Oct 2002 05:13:17



> I create a pipe with a pipe call (logic).
> When I go to write in the pipe, the process is blocked because I write
> more than 1 page (4096 bytes). In my program that CANNOT happend (gets
> blocked). I am sure that I am not going to write MORE than 2 pages.

> How can I make pipe-write-buffer bigger? (I thought that FIONBIO was
> the option in ioctl call, but I it doesnt look like that)

There are two solutions:

1) Use two pipes and a buffering process between the sender and receiver.
2) Change the kernel to use a larger pipe buffer.

In linux/include/linux/pipe_fs_i.h you will find:

#define PIPE_SIZE               PAGE_SIZE

--
Kasper Dupont -- der bruger for meget tid p? usenet.