Blame support/xposix_spawn_file_actions_adddup2.c

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