maybe someone can help me, I am writting a command line interface for an embedded device... kind of like a user shell, it just reads user input parses it, and spits back some output.
here is my problem, this CLI, needs to run over a serial port, a TCP socket, and a standard linux terminal trasparently... so instead of using send and recv, I am using read and write, which work great for TCP, and serial port, but when it comes to doing something like this on linux
read( 1, buff, sizeof(buff ));
I always get core dump.
does anyone know does linux store stdin, and stdout, as file descriptors ( not pointers )in global varibles???
thanks