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