mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-12 01:06:46 -04:00
The sequence should be the same for every fd: - Close the parent end of the pipe - If the child end of the pipe is not the intended fd already, - Dup it over - And close the old fd This fixes a double-close() in the read path (which is fairly harmless since it happens in the child, but sticks out in strace), some fd leakage, and the stderr-already-is-2 case.