Re: GIOChannel & Intercepting stdout



On 08/26/2010 02:16 PM, Magnus Hjorth wrote:
 you do (and the size of the output exceeds the pipe's buffer, which is
 fairly small), that thread will deadlock deep inside stdio.  This can
Is the buffer really that small? I made a simple test program (below) to
check this out, and it seems that writes up to 64K work without blocking
on my Ubuntu system.
I stand corrected.  I seem to remember small pipe buffer sizes on other 
Unix systems (the numbers 512 and 4096 come to mind), but I guess they 
enlarged it at some point, at least on Linux 
(http://lwn.net/Articles/118750/ details possibly related changes in 
2005).  Still, as you say, depending on this hidden constant is 
non-portable and a potential source of sneaky bugs.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]