source: vendor/glibc-include/current/spawn.h@ 2340

Last change on this file since 2340 was 1024, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 6.4 KB
Line 
1/* Definitions for POSIX spawn interface.
2 Copyright (C) 2000 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
19
20#ifndef _SPAWN_H
21#define _SPAWN_H 1
22
23#include <features.h>
24#include <sched.h>
25#include <signal.h>
26#include <sys/types.h>
27
28
29/* Data structure to contain attributes for thread creation. */
30typedef struct
31{
32 short int __flags;
33 pid_t __pgrp;
34 sigset_t __sd;
35 sigset_t __ss;
36 struct sched_param __sp;
37 int __policy;
38 int __pad[16];
39} posix_spawnattr_t;
40
41
42/* Data structure to contain information about the actions to be
43 performed in the new process with respect to file descriptors. */
44typedef struct
45{
46 int __allocated;
47 int __used;
48 struct __spawn_action *__actions;
49 int __pad[16];
50} posix_spawn_file_actions_t;
51
52
53/* Flags to be set in the `posix_spawnattr_t'. */
54#define POSIX_SPAWN_RESETIDS 0x01
55#define POSIX_SPAWN_SETPGROUP 0x02
56#define POSIX_SPAWN_SETSIGDEF 0x04
57#define POSIX_SPAWN_SETSIGMASK 0x08
58#define POSIX_SPAWN_SETSCHEDPARAM 0x10
59#define POSIX_SPAWN_SETSCHEDULER 0x20
60
61
62__BEGIN_DECLS
63
64/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
65 Before running the process perform the actions described in FILE-ACTIONS. */