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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: stdout being changed in EPICS |
From: | Eric Norum <[email protected]> |
To: | "J. Lewis Muir" <[email protected]> |
Cc: | [email protected] |
Date: | Thu, 17 Jul 2008 18:30:19 -0500 |
On 7/17/08 9:31 AM, Mark Rivers wrote:I’ve done some more investigation of this. It appears that stdout is
being closed and re-opened when the vxWorks startup script completes.
Does anyone know if this is true? If so, I don’t understand why. I
can understand why stdin may be reopened, changing from the startup
script to the console. But why stdout? Is there a way to open a file
descriptor to the console that will not be closed and re-opened when the
startup script completes?
Hi, Mark.
I looked at src/iocsh/iocsh.cpp in EPICS base 3.14.9 and it seems to be
doing some special things with (FILE *) references to support
redirection. Maybe this is causing the problem? The comment in the
file indicates the original author was Marty Kraimer and that it was
modified by Eric Norum a little later.
Not an issue. Mark isn't using iocsh.
There are about four places in the file where fclose() is called on a
(FILE *) reference. You could add a print statement before these to see
if this is indeed where stdout is getting closed.
But I bet Marty or Eric know better.
-- Eric Norum <[email protected]> Advanced Photon Source Argonne National Laboratory (630) 252-4793