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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: iocshCmd, redirection, and function pointers |
From: | Dirk Zimoch <[email protected]> |
To: | Eric Norum <[email protected]> |
Cc: | EPICS Tech Talk <[email protected]> |
Date: | Wed, 14 Mar 2012 11:12:08 +0100 |
Eric Norum wrote:
For I/O redirection to work a source file must include epicsStdioRedirect.h.
This sucks.It this is the case, I would say that there is something wrong with the EPICS redirection. Code should not need to know about its "environment". This contradicts any good programming practice.
Dirk
It's likely that lots of support modules and drivers have not yet done so. On Mar 13, 2012, at 2:11 PM, Allison, Stephanie wrote:Hello, When using redirection of output to a file in iocshCmd where the command is one that calls report functions via function pointer like dbior: iocshCmd("dbior > /dat/dbiorOutput") the output file contains only the output (printf) from the dbior routine itself but not output (printf) from each driver (called using a function pointer in drvet). Is this a limitation of the iocsh, mixing C and C++, or the non-thread-safeness (as advertised in the app dev guide) of iocshCmd? Or am I doing something else wrong? It happens on linux-x86_64, RTEMS 4.9.4, and vxWorks 5.4. Thank you, Stephanie Allison