Blame support/xposix_spawn.c

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