Re: Question about named pipe in linux



On Mar 16, 12:16 pm, "ying...@xxxxxxxxx" <ying...@xxxxxxxxx> wrote:
Hi,

I have a server (reader), client (writer) application in linux. I use
'named pipe' as the inter-process communication between the server and
client. My question is if the writer is faster than the reader, what
will happens? How much will the data be buffered if the reader is
slower than the writer?

Thank you for any help.

Depends your setting on the fd. If it is block type(by default), the
writer will be blocked until the buffer has some space for the writer.
If it unblock, it will return and it is your responsibility to retry
write.

.



Relevant Pages

  • Re: [PATCH 3/3] ring-buffer: add design document
    ... This adds the design document for the ring buffer and also ... +head - where new reads happen in the ring buffer. ... +producer - the task that writes into the ring buffer (same as writer) ... +reader - same as consumer. ...
    (Linux-Kernel)
  • Re: [PATCH 3/3] ring-buffer: add design document
    ... This adds the design document for the ring buffer and also ... +head - where new reads happen in the ring buffer. ... +producer - the task that writes into the ring buffer (same as writer) ... +reader - same as consumer. ...
    (Linux-Kernel)
  • [PATCH v2 3/3] ring-buffer: add design document
    ... This adds the design document for the ring buffer and also ... +head - where new reads happen in the ring buffer. ... +producer - the task that writes into the ring buffer (same as writer) ... +reader - same as consumer. ...
    (Linux-Kernel)
  • [PATCH 3/3] ring-buffer: add design document
    ... This adds the design document for the ring buffer and also ... +head - where new reads happen in the ring buffer. ... +producer - the task that writes into the ring buffer (same as writer) ... +reader - same as consumer. ...
    (Linux-Kernel)
  • [PATCH 3/3] ring-buffer: add design document
    ... This adds the design document for the ring buffer and also ... +head - where new reads happen in the ring buffer. ... +producer - the task that writes into the ring buffer (same as writer) ... +reader - same as consumer. ...
    (Linux-Kernel)