2 The Unix dup2 function, for systems which only have dup.
4 Copyright (C) 1985, 1986, 1987, 1988, 1990 Free Software Foundation, Inc.
6 This file is part of the Taylor UUCP package.
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of the
11 License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 The author of the program may be contacted at ian@airs.com or
23 c/o Cygnus Support, 48 Grove Street, Somerville, MA 02144.
39 /* I basically took this from the emacs 18.57 distribution, although I
40 cleaned it up a bit and made it POSIX compliant. */
52 return fcntl (oold, F_DUPFD, onew);
55 int onext, oret, isave;
62 oret = dup2 (oold, onew);