Alex Rivera | Logout

Can a pipe in Linux ever lose data?

Asked 2010-04-26T17:05:25.017
16

And is there an upper limit on how much data it can contain?

Edit
Report

1 Answer

1

The reason you will not lose data is that when the buffer associated with the pipe fills up a call to write will block until the reader has emptied the buffer enough for the operation to complete. (You can do non-blocking writes as well, but then you are responsible for making sure you complete any writes that would have blocked.)

answered 2010-04-26T17:16:10.517

Your Answer