OSDN Git Service

PR ada/60703
[pf3gnuchains/gcc-fork.git] / fixincludes / procopen.c
index 6fdb24f..22d4f67 100644 (file)
@@ -2,7 +2,7 @@
 /*
  *  server.c  Set up and handle communications with a server process.
  *
- *  Server Handling copyright 1992-1999 The Free Software Foundation
+ *  Server Handling copyright 1992-1999, 2004 The Free Software Foundation
  *
  *  Server Handling is free software.
  *  You may redistribute it and/or modify it under the terms of the
@@ -17,8 +17,8 @@
  *  You should have received a copy of the GNU General Public License
  *  along with Server Handling.  See the file "COPYING".  If not,
  *  write to:  The Free Software Foundation, Inc.,
- *             59 Temple Place - Suite 330,
- *             Boston,  MA  02111-1307, USA.
+ *             51 Franklin Street, Fifth Floor,
+ *             Boston,  MA  02110-1301, USA.
  *
  * As a special exception, The Free Software Foundation gives
  * permission for additional uses of the text contained in his release
@@ -155,8 +155,8 @@ chain_open (int stdin_fd, tCC** pp_args, pid_t* p_child)
    *  Make the fd passed in the stdin, and the write end of
    *  the new pipe become the stdout.
    */
-  fcntl (stdout_pair.write_fd, F_DUPFD, STDOUT_FILENO);
-  fcntl (stdin_fd, F_DUPFD, STDIN_FILENO);
+  dup2 (stdout_pair.write_fd, STDOUT_FILENO);
+  dup2 (stdin_fd, STDIN_FILENO);
 
   if (*pp_args == (char *) NULL)
     *pp_args = pz_cmd;