I am currently writing a little program that will be called instead of the
player (in INIT) but will start the player itself on the slave end of
a pseudo-tty. My purpose for this is to detach the player IO from the
serial port when in the docking sleeve so I can use the serial port for
my own communication with an external board I am building. I also
want to keep in communication with the player's output so I know when
we change songs. I am using pty's as doing the dual-pipe thing creates
block buffered I/O whereas the pty way keeps it in line-buffered mode.

I am close but I'm having a small problem. I am using the forkpty glibc
routine to create a child on a slave-pty and then exec the player. I can get
the stdout and stderr of the player just fine, keeping it from showing
up on the console unless I want to pass something on. The problem
is stdin. The player seems to step around me and grab stdin directly
from the console and away from my little go-between program. I
wrote another little test program that does simple gets/puts stuff
and it works as expected but the player seems to be a little trickier.

Does anyone know whether the player grabs /dev/console (or ttyS1)
specifically rather than using its default standard input when it starts
up? The even stranger thing is how my program gets _some_ of the
characters but not the others... almost like both processes are reading
out of the same buffer and who ever get there first, gets the data.
Not exactly the behaviour I need :)

Ideas?