105436638acc7c010349a69c3395f1a57c642dc62Ying Wang/* Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc.
205436638acc7c010349a69c3395f1a57c642dc62Ying Wang   This file is part of the GNU C Library.
305436638acc7c010349a69c3395f1a57c642dc62Ying Wang
405436638acc7c010349a69c3395f1a57c642dc62Ying Wang   This program is free software: you can redistribute it and/or modify
505436638acc7c010349a69c3395f1a57c642dc62Ying Wang   it under the terms of the GNU General Public License as published by
605436638acc7c010349a69c3395f1a57c642dc62Ying Wang   the Free Software Foundation; either version 3 of the License, or
705436638acc7c010349a69c3395f1a57c642dc62Ying Wang   (at your option) any later version.
805436638acc7c010349a69c3395f1a57c642dc62Ying Wang
905436638acc7c010349a69c3395f1a57c642dc62Ying Wang   This program is distributed in the hope that it will be useful,
1005436638acc7c010349a69c3395f1a57c642dc62Ying Wang   but WITHOUT ANY WARRANTY; without even the implied warranty of
1105436638acc7c010349a69c3395f1a57c642dc62Ying Wang   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1205436638acc7c010349a69c3395f1a57c642dc62Ying Wang   GNU General Public License for more details.
1305436638acc7c010349a69c3395f1a57c642dc62Ying Wang
1405436638acc7c010349a69c3395f1a57c642dc62Ying Wang   You should have received a copy of the GNU General Public License
1505436638acc7c010349a69c3395f1a57c642dc62Ying Wang   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
1605436638acc7c010349a69c3395f1a57c642dc62Ying Wang
1705436638acc7c010349a69c3395f1a57c642dc62Ying Wang#include <config.h>
1805436638acc7c010349a69c3395f1a57c642dc62Ying Wang
1905436638acc7c010349a69c3395f1a57c642dc62Ying Wang/* Specification.  */
2005436638acc7c010349a69c3395f1a57c642dc62Ying Wang#include <spawn.h>
2105436638acc7c010349a69c3395f1a57c642dc62Ying Wang
2205436638acc7c010349a69c3395f1a57c642dc62Ying Wang#include "spawn_int.h"
2305436638acc7c010349a69c3395f1a57c642dc62Ying Wang
2405436638acc7c010349a69c3395f1a57c642dc62Ying Wang/* Spawn a new process executing FILE with the attributes describes in *ATTRP.
2505436638acc7c010349a69c3395f1a57c642dc62Ying Wang   Before running the process perform the actions described in FILE-ACTIONS. */
2605436638acc7c010349a69c3395f1a57c642dc62Ying Wangint
2705436638acc7c010349a69c3395f1a57c642dc62Ying Wangposix_spawnp (pid_t *pid, const char *file,
2805436638acc7c010349a69c3395f1a57c642dc62Ying Wang              const posix_spawn_file_actions_t *file_actions,
2905436638acc7c010349a69c3395f1a57c642dc62Ying Wang              const posix_spawnattr_t *attrp, char *const argv[],
3005436638acc7c010349a69c3395f1a57c642dc62Ying Wang              char *const envp[])
3105436638acc7c010349a69c3395f1a57c642dc62Ying Wang{
3205436638acc7c010349a69c3395f1a57c642dc62Ying Wang  return __spawni (pid, file, file_actions, attrp, argv, envp, 1);
3305436638acc7c010349a69c3395f1a57c642dc62Ying Wang}
34