Re: /proc/PID/fd/0 design "bug"

Guest section DW (dwguest@win.tue.nl)
Tue, 23 Dec 1997 17:32:13 +0100 (MET)


Lars Marowsky-Bree <lmb@pointer.teuto.de> writes:

> > 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* .