EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: stdout/stderr buffering on Windows
From: "J. Lewis Muir" <[email protected]>
To: [email protected], [email protected]
Date: Thu, 06 Feb 2014 14:52:56 -0600
On 2/6/14, 10:18 AM, [email protected] wrote:
> Hi Andrew,
>
>>
>> I do not see that buffering behaviour when running an IOC in a Cygwin
>> OpenSSH session either.
>>
>
> Thanks for doing that - it prompted me to do a bit more
> investigating. On my Cygwin installation there are several ways to
> create a terminal - mintty, bash, and xterm. If I run a native windows
> compiled softIoc.exe in the bash terminal window, all works fine. If
> I run it in a mintty terminal window, I don't see any standard error
> output until I exit the IOC - then it all appears on screen.  A Cygwin
> xterm window behaves the same - no stderr until the IOC is exited. If
> I type "tty" in the respective Cygwin windows, I see that mintty and
> xterm are both pseudo terminals whereas bash is a console session - I
> believe procServ uses forkpty(). So I think it boils down to Windows
> treating a Cygwin pty as non-interactive and thus buffering both
> stdout and stderr - I don't know whether it is possible to convince
> Windows to treat a Cygwin pty as a real terminal session? As you
> mentioned, the C99 standard mandates stderr to always be unbuffered so
> Windows is certainly not conforming here!

Hi, Freddie.

What does the following Bourne shell command print for your three
scenarios?

$ test -t 0 && echo 'connected to terminal'

Lewis

References:
stdout/stderr buffering on Windows freddie.akeroyd
Re: stdout/stderr buffering on Windows Andrew Johnson
RE: stdout/stderr buffering on Windows freddie.akeroyd

Navigate by Date:
Prev: RE: CSS 3.2.14 Cannot get PyDev installed Emmanuel Mayssat
Next: Re: stdout/stderr buffering on Windows J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: stdout/stderr buffering on Windows freddie.akeroyd
Next: Re: stdout/stderr buffering on Windows J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·