On 2/6/14, 3:37 PM, Andrew Johnson wrote:
>> Was that a Windows IOC or a Cygwin IOC?
>
> That IOC was built for the cygwin-x86 target architecture.
>
> Hmm, trying it again on an IOC built using Microsoft VS10 shows the
> behaviour that Freddie described: stdout is line-buffered (I have to
> press return at the iocsh prompt for a background task's messages to
> appear), and stderr messages don't appear until I exit the IOC.
>
> Interesting, thanks for asking that.
>
> Your "test -t" check says that FDs 0, 1 and 2 are all connected to a
> terminal BTW.
Hi, Andrew.
OK, then maybe the problem is with Cygwin's pseudo terminal emulation
which uses pipes? From what I can gather, this is a known weakness.
And a solution may not be straightforward since the Cygwin people would
have fixed it by now if it was? I don't know enough about it to say.
The following mintty issue has some helpful comments (andy.koppe is the
mintty author):
https://code.google.com/p/mintty/issues/detail?id=56
Comment #13 suggests the best way to avoid the problem is to use Cygwin
programs under Cygwin terminals and Windows programs under Windows
consoles.
Comment #49 mentions a program called winpty that adapts a Windows
console to the Cygwin terminal by creating a hidden Windows console and
polling it for changes. It's at:
https://github.com/rprichard/winpty
Lewis
- References:
- stdout/stderr buffering on Windows freddie.akeroyd
- Re: stdout/stderr buffering on Windows Andrew Johnson
- Re: stdout/stderr buffering on Windows J. Lewis Muir
- Re: stdout/stderr buffering on Windows Andrew Johnson
- Navigate by Date:
- Prev:
Re: stdout/stderr buffering on Windows Andrew Johnson
- Next:
RE: CSS 3.2.14 Cannot get PyDev installed Amien Crombie
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: stdout/stderr buffering on Windows Andrew Johnson
- Next:
CSS 3.2.14 Cannot get PyDev installed Amien Crombie
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|