Home | History | Annotate | Line # | Download | only in include
spawn.h revision 1.4.2.2
      1  1.4.2.2  yamt /*	$NetBSD: spawn.h,v 1.4.2.2 2012/04/17 00:05:10 yamt Exp $	*/
      2  1.4.2.2  yamt 
      3  1.4.2.2  yamt /*-
      4  1.4.2.2  yamt  * Copyright (c) 2008 Ed Schouten <ed (at) FreeBSD.org>
      5  1.4.2.2  yamt  * All rights reserved.
      6  1.4.2.2  yamt  *
      7  1.4.2.2  yamt  * Redistribution and use in source and binary forms, with or without
      8  1.4.2.2  yamt  * modification, are permitted provided that the following conditions
      9  1.4.2.2  yamt  * are met:
     10  1.4.2.2  yamt  * 1. Redistributions of source code must retain the above copyright
     11  1.4.2.2  yamt  *    notice, this list of conditions and the following disclaimer.
     12  1.4.2.2  yamt  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.4.2.2  yamt  *    notice, this list of conditions and the following disclaimer in the
     14  1.4.2.2  yamt  *    documentation and/or other materials provided with the distribution.
     15  1.4.2.2  yamt  *
     16  1.4.2.2  yamt  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     17  1.4.2.2  yamt  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     18  1.4.2.2  yamt  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     19  1.4.2.2  yamt  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     20  1.4.2.2  yamt  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     21  1.4.2.2  yamt  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     22  1.4.2.2  yamt  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     23  1.4.2.2  yamt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     24  1.4.2.2  yamt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25  1.4.2.2  yamt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26  1.4.2.2  yamt  * SUCH DAMAGE.
     27  1.4.2.2  yamt  *
     28  1.4.2.2  yamt  * $FreeBSD: src/include/spawn.h,v 1.3.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $
     29  1.4.2.2  yamt  */
     30  1.4.2.2  yamt 
     31  1.4.2.2  yamt #ifndef _SPAWN_H
     32  1.4.2.2  yamt #define _SPAWN_H
     33  1.4.2.2  yamt 
     34  1.4.2.2  yamt #include <sys/spawn.h>
     35  1.4.2.2  yamt 
     36  1.4.2.2  yamt __BEGIN_DECLS
     37  1.4.2.2  yamt /*
     38  1.4.2.2  yamt  * Spawn routines
     39  1.4.2.2  yamt  *
     40  1.4.2.2  yamt  */
     41  1.4.2.2  yamt int posix_spawn(pid_t * __restrict, const char * __restrict,
     42  1.4.2.2  yamt     const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
     43  1.4.2.2  yamt     char * const *__restrict, char * const *__restrict);
     44  1.4.2.2  yamt int posix_spawnp(pid_t * __restrict, const char * __restrict,
     45  1.4.2.2  yamt     const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
     46  1.4.2.2  yamt     char * const *__restrict, char * const *__restrict);
     47  1.4.2.2  yamt 
     48  1.4.2.2  yamt /*
     49  1.4.2.2  yamt  * File descriptor actions
     50  1.4.2.2  yamt  */
     51  1.4.2.2  yamt int posix_spawn_file_actions_init(posix_spawn_file_actions_t *);
     52  1.4.2.2  yamt int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *);
     53  1.4.2.2  yamt 
     54  1.4.2.2  yamt int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t * __restrict,
     55  1.4.2.2  yamt     int, const char * __restrict, int, mode_t);
     56  1.4.2.2  yamt int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, int);
     57  1.4.2.2  yamt int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int);
     58  1.4.2.2  yamt 
     59  1.4.2.2  yamt /*
     60  1.4.2.2  yamt  * Spawn attributes
     61  1.4.2.2  yamt  */
     62  1.4.2.2  yamt int posix_spawnattr_init(posix_spawnattr_t *);
     63  1.4.2.2  yamt int posix_spawnattr_destroy(posix_spawnattr_t *);
     64  1.4.2.2  yamt 
     65  1.4.2.2  yamt int posix_spawnattr_getflags(const posix_spawnattr_t * __restrict,
     66  1.4.2.2  yamt     short * __restrict);
     67  1.4.2.2  yamt int posix_spawnattr_getpgroup(const posix_spawnattr_t * __restrict,
     68  1.4.2.2  yamt     pid_t * __restrict);
     69  1.4.2.2  yamt int posix_spawnattr_getschedparam(const posix_spawnattr_t * __restrict,
     70  1.4.2.2  yamt     struct sched_param * __restrict);
     71  1.4.2.2  yamt int posix_spawnattr_getschedpolicy(const posix_spawnattr_t * __restrict,
     72  1.4.2.2  yamt     int * __restrict);
     73  1.4.2.2  yamt int posix_spawnattr_getsigdefault(const posix_spawnattr_t * __restrict,
     74  1.4.2.2  yamt     sigset_t * __restrict);
     75  1.4.2.2  yamt int posix_spawnattr_getsigmask(const posix_spawnattr_t * __restrict,
     76  1.4.2.2  yamt     sigset_t * __restrict sigmask);
     77  1.4.2.2  yamt 
     78  1.4.2.2  yamt int posix_spawnattr_setflags(posix_spawnattr_t *, short);
     79  1.4.2.2  yamt int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t);
     80  1.4.2.2  yamt int posix_spawnattr_setschedparam(posix_spawnattr_t * __restrict,
     81  1.4.2.2  yamt     const struct sched_param * __restrict);
     82  1.4.2.2  yamt int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int);
     83  1.4.2.2  yamt int posix_spawnattr_setsigdefault(posix_spawnattr_t * __restrict,
     84  1.4.2.2  yamt     const sigset_t * __restrict);
     85  1.4.2.2  yamt int posix_spawnattr_setsigmask(posix_spawnattr_t * __restrict,
     86  1.4.2.2  yamt     const sigset_t * __restrict);
     87  1.4.2.2  yamt __END_DECLS
     88  1.4.2.2  yamt 
     89  1.4.2.2  yamt #endif /* _SPAWN_H */
     90