79444240

Date: 2025-02-17 01:59:52
Score: 1.5
Natty:
Report link

Short answer to the question: No. That is not how Standard I/O works on any platform I am aware of. Once data has left the process it's vanished beyond any retrieval, in general.

Longer answer: Yes, sort of, but not like that. And it's going to be platform-specific. For example, in Unix I can redirect my standard output to a new pipe, fork a child, and have that child retrieve the data from the pipe, pass it on to the original standard output (and thus onward out of my reach), and also pass it back to me in some manner that I've devised. (Another pipe? A file? Shared memory buffer? Depends on what my needs are.) The standard tee program should hint at the possibilities.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: jimc