Re: cat problem
From: Weiguang Shi (wgshi_at_namao.cs.ualberta.ca)
Date: 11/07/04
- Next message: Stachu 'Dozzie' K.: "Re: shell error codes"
- Previous message: gregg: "Re: shell error codes"
- In reply to: Barry Margolin: "Re: cat problem"
- Next in thread: Stephane CHAZELAS: "Re: cat problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 7 Nov 2004 19:46:20 +0000 (UTC)
Barry Margolin wrote:
>
>It *does* block. But when read() blocks, it will return as soon as any
>data is available, it doesn't wait for the buffer to fill up. The
>buffer size is just a maximum, not necessarily the expected size of the
>message. Just because you use a buffer that's 1KB doesn't mean you
>actually expect that much data, you just want to allow for it in case it
>comes.
That's right: blocking doesn't equal to filling.
Thanks.
Weiguang
- Next message: Stachu 'Dozzie' K.: "Re: shell error codes"
- Previous message: gregg: "Re: shell error codes"
- In reply to: Barry Margolin: "Re: cat problem"
- Next in thread: Stephane CHAZELAS: "Re: cat problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|