Blame support/xposix_spawn_file_actions_adddup2.c

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