/* * Copyright 2004-2009, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. */ #include #include #include #include #include int dup(int fd) { RETURN_AND_SET_ERRNO(_kern_dup(fd)); } int dup2(int oldFD, int newFD) { return dup3(oldFD, newFD, 0); } int dup3(int oldFD, int newFD, int flags) { RETURN_AND_SET_ERRNO(_kern_dup2(oldFD, newFD, flags)); }