adjust posix_spawn dup2 action behavior to match future requirements