> > which isn't what you want at all. What you want to is find the process
> > that is actually writing out, (i.e. the other end of the pipe or
> > whatnot) and do your write there.
> > Of course, this fails for processes reading from devices or files.
>
> See, this is the point. I want to simulate keyboard entry. How would I do
> this?
There's an ioctl() around to stuff the keystrokes into the tty
buffer. (damned if I can remember the name of it. UTSL).
TIOCSTI - for an example of its use, see the "sti" utility
found in the contrib directory of kbd-0.9* .