121b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes/* 221b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * Copyright (C) 2017 The Android Open Source Project 321b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * All rights reserved. 421b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * 521b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * Redistribution and use in source and binary forms, with or without 621b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * modification, are permitted provided that the following conditions 721b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * are met: 821b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * * Redistributions of source code must retain the above copyright 921b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * notice, this list of conditions and the following disclaimer. 1021b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * * Redistributions in binary form must reproduce the above copyright 1121b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * notice, this list of conditions and the following disclaimer in 1221b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * the documentation and/or other materials provided with the 1321b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * distribution. 1421b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * 1521b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1621b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1721b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 1821b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 1921b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 2021b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 2121b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 2221b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 2321b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2421b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 2521b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2621b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes * SUCH DAMAGE. 2721b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes */ 2821b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes 2921b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes#include <spawn.h> 3021b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes 3121b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes#include "header_checks.h" 3221b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes 3321b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughesstatic void spawn_h() { 3421b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes TYPE(posix_spawnattr_t); 3521b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes TYPE(posix_spawn_file_actions_t); 3621b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes 3721b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes TYPE(mode_t); 3821b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes TYPE(pid_t); 3921b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes 4021b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes TYPE(sigset_t); 4121b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes 4221b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes TYPE(struct sched_param*); 4321b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes 4421b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes MACRO(POSIX_SPAWN_RESETIDS); 4521b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes MACRO(POSIX_SPAWN_SETPGROUP); 4621b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes MACRO(POSIX_SPAWN_SETSCHEDPARAM); 4721b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes MACRO(POSIX_SPAWN_SETSCHEDULER); 4821b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes MACRO(POSIX_SPAWN_SETSIGDEF); 4921b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes MACRO(POSIX_SPAWN_SETSIGMASK); 5021b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes 5121b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawn, int (*f)(pid_t*, const char*, const posix_spawn_file_actions_t*, const posix_spawnattr_t*, char* const[], char* const[])); 5221b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawn_file_actions_addclose, int (*f)(posix_spawn_file_actions_t*, int)); 5321b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawn_file_actions_adddup2, int (*f)(posix_spawn_file_actions_t*, int, int)); 5421b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawn_file_actions_addopen, int (*f)(posix_spawn_file_actions_t*, int, const char*, int, mode_t)); 5521b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawn_file_actions_destroy, int (*f)(posix_spawn_file_actions_t*)); 5621b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawn_file_actions_init, int (*f)(posix_spawn_file_actions_t*)); 5721b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_destroy, int (*f)(posix_spawnattr_t*)); 5821b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_getflags, int (*f)(const posix_spawnattr_t*, short*)); 5921b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_getpgroup, int (*f)(const posix_spawnattr_t*, pid_t*)); 6021b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_getschedparam, int (*f)(const posix_spawnattr_t*, struct sched_param*)); 6121b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_getschedpolicy, int (*f)(const posix_spawnattr_t*, int*)); 6221b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_getsigdefault, int (*f)(const posix_spawnattr_t*, sigset_t*)); 6321b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_getsigmask, int (*f)(const posix_spawnattr_t*, sigset_t*)); 6421b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_init, int (*f)(posix_spawnattr_t*)); 6521b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_setflags, int (*f)(posix_spawnattr_t*, short)); 6621b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_setpgroup, int (*f)(posix_spawnattr_t*, pid_t)); 6721b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_setschedparam, int (*f)(posix_spawnattr_t*, const struct sched_param*)); 6821b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_setsigdefault, int (*f)(posix_spawnattr_t*, const sigset_t*)); 6921b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnattr_setsigmask, int (*f)(posix_spawnattr_t*, const sigset_t*)); 7021b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes FUNCTION(posix_spawnp, int (*f)(pid_t*, const char*, const posix_spawn_file_actions_t*, const posix_spawnattr_t*, char* const[], char* const[])); 7121b56ebbd49362d293e1f56c4b3265c227bbbbaeElliott Hughes} 72