2 ms·
It's actually a pretty simple model. Every process has an array of open file objects. File descriptors are indexes into that array. "Redirection" copies the
by dllthomas 7y ago
It's actually a pretty simple model. Every process has an array of open file objects. File descriptors are indexes into that array. "Redirection" copies the underlying entries, and are processed left-to-right.
"Redirecting streams" winds up being confusing - it's all just `dup2`.