I am running a vxWorks C application that is launched inside a boot up script. Everything runs fine, except that I don't see the printf debug traces of my software whenever I connect remotely to the embedded telnet server after the script has launched my software at boot time.
I can see the debug traces on my telnet session when I run the software manually at the prompt.
I think this has to do with the fact that the SHELL_MAX_SESSIONS kernel option is set to -1 (unlimited), so I guess that the initial session that is defaulted to the serial line doesn't show the debug traces on the new telnet session. I tried to set the SHELL_MAX_SESSIONS option to 1, but I lose the telnet session. And 2 sessions gives me the same problem.
I'd like to know if there's a way to centralize or redirect all stdio outputs on each open sessions ?
I am running vxWorks 6.9.
Thanks for your help
I've had a similar problem with VxWorks 6.7 (and from my collegues I know that 6.9 behaves the same way).
My solution (although it is not nice) was to create a function within my program which redirects the stdout and stderr of all tasks to the stdout and stderr of the current (calling) task (e.g. the current telnet session).
Look at the functions ioTaskStdGet
and ioTaskStdSet
of the ioLib.