Blame support/xposix_spawn_file_actions_adddup2.c

Packit Service c5c050
/* xposix_spawn_file_actions_adddup2 implementation.
Packit Service c5c050
   Copyright (C) 2019 Free Software Foundation, Inc.
Packit Service c5c050
   This file is part of the GNU C Library.
Packit Service c5c050
Packit Service c5c050
   The GNU C Library is free software; you can redistribute it and/or
Packit Service c5c050
   modify it under the terms of the GNU Lesser General Public
Packit Service c5c050
   License as published by the Free Software Foundation; either
Packit Service c5c050
   version 2.1 of the License, or (at your option) any later version.
Packit Service c5c050
Packit Service c5c050
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service c5c050
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service c5c050
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service c5c050
   Lesser General Public License for more details.
Packit Service c5c050
Packit Service c5c050
   You should have received a copy of the GNU Lesser General Public
Packit Service c5c050
   License along with the GNU C Library; if not, see
Packit Service c5c050
   <http://www.gnu.org/licenses/>.  */
Packit Service c5c050
Packit Service c5c050
#include <support/xspawn.h>
Packit Service c5c050
#include <support/check.h>
Packit Service c5c050
Packit Service c5c050
int
Packit Service c5c050
xposix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *fa, int fd,
Packit Service c5c050
                                  int newfd)
Packit Service c5c050
{
Packit Service c5c050
  int status = posix_spawn_file_actions_adddup2 (fa, fd, newfd);
Packit Service c5c050
  if (status == -1)
Packit Service c5c050
    FAIL_EXIT1 ("posix_spawn_file_actions_adddup2 failed: %m\n");
Packit Service c5c050
  return status;
Packit Service c5c050
}