redirect stdin/out/err to socket

Joel Sherrill joel.sherrill at
Wed Oct 10 22:02:38 UTC 2007


I was trying to understand some of the magic in telnetd
where it redirects stdin/out/err to the socket. I have
created a simple echoServer on UNIX and am trying to use
the code in telnetd as reference for how to redirect
stdio to the socket.

Unfortunately, I can't reproduce the effect on GNU/Linux
since the telnetd code uses RTEMS specific code to allocate
the pty and redirect.

Can someone point me to some example code that does this
on UNIX?

Just wanting to learn. :-D


More information about the users mailing list