Input/Output

Back to Languages/Bash

When executing a command, following steps in order are:
- if stdout of previous command is piped into stdin of current cmd, /proc/<current_process_ID>/fd/0 targets same anonymous pipe as /proc/<previous_process_ID>/fd/1
- if stdout of current cmd is piped to another, set ps output to another anonymous pipe