#include dup2(a, b) { close(b); return(fcntl(a, F_DUPFD, b)); }