For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > July 2004 > pipe question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author pipe question
Tejas Kokje

2004-07-24, 3:56 am


When using pipe, what happens after I write PIP_BUF amount of
data ?


Michael B Allen

2004-07-28, 9:05 pm

On Fri, 23 Jul 2004 23:43:05 -0400, Tejas Kokje wrote:

> When using pipe, what happens after I write PIP_BUF amount of data ?


I don't know what PIP_BUF is but if you mean what happends when the pipe
is full the answer is the write blocks until data is read from the other
end of the pipe. That is unless you set the pipe to use non-blocking IO
in which case you will get EAGAIN.

Mike
Jens.Toerring@physik.fu-berlin.de

2004-07-28, 9:05 pm

Michael B Allen <mba2000@ioplex.com> wrote:
> On Fri, 23 Jul 2004 23:43:05 -0400, Tejas Kokje wrote:


[color=darkred]
> I don't know what PIP_BUF is but if you mean what happends when the pipe
> is full the answer is the write blocks until data is read from the other
> end of the pipe. That is unless you set the pipe to use non-blocking IO
> in which case you will get EAGAIN.


I guess the OP meant PIPE_BUF, which is the largest amount of data
you can write atomically to a pipe (so it's basically the kernels
pipe buffer size).
Regards, Jens
--
\ Jens Thoms Toerring ___ Jens.Toerring@physik.fu-berlin.de
\__________________________ http://www.toerring.de
sean larsson

2004-07-28, 9:05 pm

On Fri, 23 Jul 2004 20:43:05 -0700
Tejas Kokje <kokje@usc.edu> wrote:

>
> When using pipe, what happens after I write PIP_BUF amount of
> data ?
>
>


http://wwwwbs.cs.tu-berlin.de/user-..._Atomicity.html

--
-sean
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com