20.2.3 Redirecting process IO

> hi.
> 
> I have combed the docs and online videos, but I can not find the
> answer to my question anywhere.  How do I provide user input (e.g.
> stdin) to a program being debugged with radare?

In one terminal type: 'tty'. you will get something like this:

$ tty
/dev/pts/6
$ while : ; do sleep 2 ; done

The nop loop while fix the handling of stdin/stdout by the shell, so only the debugged program will use this pts.

Then in another terminal run this command:

$ radare -e child.stdio=/dev/pts/6 -d cat
[0x8048003]> !cont

You will see the command running in the other shell:

hello
hello
foo
foo
...
...

You can also redirect the stdin/stdout/stderr file descriptors to files.