[ale] how to redirect fds through telnet session in QNX?

Christopher Fowler cfowler at outpostsentinel.com
Sat Mar 24 16:06:58 EDT 2007


My guess is that the program runs on the console of the device and
therefore wants to output to the console.  It seems to me that /dev/con1
is QNX's version of Linux's virtual consoles so they are not useful.

If I had to have the output via IP then I might would do it this way.

#1.  Instead of running your code at startup I would run a program that
would merge the output of your code to a TCP socket.

#2.  Simply telnet to that socket.

Now to restart your code do not restart the master program.  Send
SIGUSR1 or SIGTERM to your code and the master program sill simply
respawn your code.

If you are trying to redirect the output of your program to a pseudo
that is not in use then that will not work.  A program must have an open
FD to the master side of a pseudo before the slave can work.  

I would also look at user circular buffers to store debug messages on
the device since you have little mem and no swap.  You can start filling
up a file.  I doubt you have that type of capability in QNX to begin
with.


On Sat, 2007-03-24 at 15:48 -0400, Step wrote:
> Here is the statement from wikipedia that caught my attention: "The
> popularity and availability of faster information exchange systems
> such as ethernet made the use of null-modem cables less common.
> Nowadays, such a cable can still be useful to kernel hackers though,
> since it allows the user to remotely debug a kernel with a minimum of
> device drivers and code". 
> 

Such a device is still useful when IP access fails due to any reason.




More information about the Ale mailing list