Maybe use bits:
```
kSTDOUT = 1,
kSTDERR = 2,
kSTDBOTH = 3
```
thus that we can use `if (what & kSTDOUT) // redirect stdout`