>Two provisos: System V users will want to use fcntl(, F_DUPFD, ) instead of >dup2() Although: 1) S5R3 has "dup2()" and 2) 4.[23]BSD has "fcntl(F_DUPFD)" so if you're willing to rule out older systems you can avoid polluting your code with "#ifdef"s.