User-mode, not kernel.
#include <sys/ioctl.h>
char ch;
ioctl(fd, TIOCSTI, &ch);
forces character ch into the input buffer provided fd refers to your
controlling terimnal (or your privileged). Quick example:
#include <sys/ioctl.h>
int main(void) {
ioctl(1, TIOCSTI, "l");
ioctl(1, TIOCSTI, "s");
ioctl(1, TIOCSTI, "\n");
return 0;
}
--Malcolm
-- Malcolm Beattie <mbeattie@sable.ox.ac.uk> Unix Systems Programmer Oxford University Computing Services