+ I32 i, child_fd, max = av_len(redir);
+
+ for (child_fd = 0; child_fd <= max; child_fd++) {
+ SV **parent = av_fetch(redir, child_fd, 0);
+ int parent_fd = SvIV(*parent);
+ if (parent_fd == child_fd)
+ continue;
+ if (dup2(parent_fd, child_fd) < 0)
+ exit_err(&cerrnum);
+ }