linux - Can I modify stdin descriptor for particular process? -
here scenario:
i opened 3 terminals: term1, term2, term3. pid of term1 6549.
ps -fp 6549
gives:
bc 6549 3642 0 11:07 pts/8 00:00:00 bash
now, on terminal 2 typed
tail -f /proc/6549/fd/0
so far nothing happens, ok, in nothing being processed process 6549. on terminal3 execute:
echo "any kind of text" | write $user pts/8
which sending text. output on terminal1 ok, nothing appears on tailed descriptor. possible see input of data passed execute process 6549? how 6549 use files inside /proc/6549/fd directory ?
edit: same stdout: cannot see output of tail, output on terminal above pid ok.
reading terminal reads input terminal's keyboard (real or virtual). writing terminal writes output terminal's screen.
what you're doing writing terminal's screen , expecting output loop keyboard input instead of being displayed:
the answer no, can not that. if want run program in terminal session multiple processes can provide input, use tool screen
or tmux
supports kind of screen sharing.
Comments
Post a Comment