Re: GIOChannel & Intercepting stdout
- From: Hrvoje Niksic <hrvoje niksic avl com>
- To: gtk-list gnome org
- Subject: Re: GIOChannel & Intercepting stdout
- Date: Thu, 26 Aug 2010 16:00:21 +0200
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]