Blame support/xposix_spawn.c

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