|visits||member for||2 years, 11 months|
|seen||Aug 16 '13 at 15:37|
Can a command line program prevent its output being redirected?
If you are not running in a tty, but instead in a pty, you can find that by looking at procfs (/proc/$PID/fd/0 etc). To write to the appropriate pty, go to your parent process's fd directory and see if it's a symlink to /dev/pts/[0-9]+. Then you write to that device (or recurse if it isn't a pts).