Re: GIOChannel & Intercepting stdout
- From: Chris Vine <chris cvine freeserve co uk>
- To: Magnus Hjorth <magnus i hjorth gmail com>
- Cc: gtk-list gnome org
- Subject: Re: GIOChannel & Intercepting stdout
- Date: Fri, 27 Aug 2010 00:47:56 +0100
On Thu, 26 Aug 2010 14:16:28 +0200
Magnus Hjorth <magnus i hjorth gmail com> wrote:
> 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. Of course, it is still ugly (and
> non-portable) to depend on this.
I am extremely surprised that it is as large as 65536 in your case.
POSIX requires PIPE_BUF to be at least 512, and on most unix-like
systems it is 4096.
It is pretty astonishing that your example does not block.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]