This is less error prone since dup3() returns an error if old == new. Sudo guarantees that fds 0-2 are already open.