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

Michael O'Reilly (
23 Dec 1997 09:12:08 +0800

Lars Marowsky-Bree <> 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.
> >=20
> > 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).