stdin is just another name for FD 0. stdout is just another name for FD 1. stderr is just another name for FD 2. By definition, anything going to FD 0 is going to stdin. By definition, anything coming from FD 1 is coming from stdout. By definition, anything coming from FD2 is coming from stderr.